From d76063c3f3c287230b4fee06267c64699f6f802a Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Thu, 30 Jan 2025 16:46:53 +0100 Subject: [PATCH] Fix unit tests --- tests/conftest.py | 2 +- tests/test_modules.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3bd382b..f909bfb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -28,7 +28,7 @@ def setup_module(request): # add the tmp_dir to the module tmp_dir = TemporaryDirectory() - m.tmp_dir = tmp_dir + m.tmp_dir = tmp_dir.name def cleanup(): _LAZY_LOADED_MODULES.pop(module_name) diff --git a/tests/test_modules.py b/tests/test_modules.py index a4c0ec8..854edb5 100644 --- a/tests/test_modules.py +++ b/tests/test_modules.py @@ -66,7 +66,7 @@ def test_load_module(example_module): # check that the vlaue is set on the module itself assert loaded_module.csv_file == "db.csv" -@pytest.mark.parametrize("module_name", ["cli_feeder", "local_storage", "generic_extractor", "html_formatter", "csv_db"]) +@pytest.mark.parametrize("module_name", ["local_storage", "generic_extractor", "html_formatter", "csv_db"]) def test_load_modules(module_name): # test that specific modules can be loaded module = get_module_lazy(module_name) @@ -84,7 +84,7 @@ def test_load_modules(module_name): assert loaded_module.name in loaded_module.config.keys() -@pytest.mark.parametrize("module_name", ["cli_feeder", "local_storage", "generic_extractor", "html_formatter", "csv_db"]) +@pytest.mark.parametrize("module_name", ["local_storage", "generic_extractor", "html_formatter", "csv_db"]) def test_lazy_base_module(module_name): lazy_module = get_module_lazy(module_name)