From fd73dc577f93ed67302badbfd56ce452eb577a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rasmus=20Vester=20Th=C3=B8gersen?= <34004462+rasmusthog@users.noreply.github.com> Date: Sun, 23 Oct 2022 18:59:00 +0000 Subject: [PATCH] Fix test issues --- nafuma/test/test_auxillary.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/nafuma/test/test_auxillary.py b/nafuma/test/test_auxillary.py index 4cb9cd1..3425814 100644 --- a/nafuma/test/test_auxillary.py +++ b/nafuma/test/test_auxillary.py @@ -4,16 +4,16 @@ import os def test_swap_values(): - dict = {'test1': 1, 'test2': 2} + test_dict = {'test1': 1, 'test2': 2} key1 = 'test1' key2 = 'test2' - oldval1 = dict[key1] - oldval2 = dict[key2] + oldval1 = test_dict[key1] + oldval2 = test_dict[key2] - new_dict = aux.swap_values(dict=dict, key1=key1, key2=key2) + new_dict = aux.swap_values(options=test_dict, key1=key1, key2=key2) - assert (dict[key1] == oldval2) and (dict[key2] == oldval1) + assert (test_dict[key1] == oldval2) and (test_dict[key2] == oldval1) def test_ceil() -> None: @@ -35,7 +35,7 @@ def test_options() -> None: options = {} - required_options = ['test1', 'test2', 'test3', 'test4'] + default_options = { 'test1': 1, 'test2': 2, @@ -45,11 +45,9 @@ def test_options() -> None: } - options = aux.update_options(options=options, required_options=required_options, default_options=default_options) + options = aux.update_options(options=options, default_options=default_options) assert options['test1'] == default_options['test1'] - assert len(options.items()) == len(required_options) - assert 'test5' not in options.keys() def test_save_options() -> None: @@ -75,4 +73,4 @@ def test_load_options() -> None: assert (loaded_options['test1'] == 1) and (loaded_options['test2'] == 2) - os.remove(path) \ No newline at end of file + os.remove(path)