diff --git a/.gitignore b/.gitignore index 3bc76765c891217f3c7e5f07ac868a1fc861d5d1..a70a62ab9b24332dd422c675b9de1d7aeebcffb3 100644 --- a/.gitignore +++ b/.gitignore @@ -110,7 +110,6 @@ venv.bak/ omero_py/omeroweb/ omero_py/pipeline/ **.ipynb -data/ notebooks/ *.pdf *.h5 diff --git a/tests/agora/base_test.py b/tests/agora/base_test.py index feefb908ea9e1a304f0e335544f21e778a69f9e7..feb333b965ff8c15607591e4e917867508bbf0cb 100644 --- a/tests/agora/base_test.py +++ b/tests/agora/base_test.py @@ -44,7 +44,7 @@ def test_to_yaml(yaml_file): def test_dict(example_dict): params = DummyParameters(**example_dict) - assert params.to_dict() == param_dict + assert params.to_dict() == example_dict # Remove params.to_yaml("outfile.yml") diff --git a/tests/agora/conftest.py b/tests/agora/conftest.py index 6804b892ca82fa7267d6084538f7e998776dc764..7125dc5e190bc5a7f528b36c09865a631eed0780 100644 --- a/tests/agora/conftest.py +++ b/tests/agora/conftest.py @@ -3,24 +3,29 @@ Load data necessary to test agora. """ import typing as t -from pathlib import Path +from pathlib import Path, PosixPath import pytest @pytest.fixture(scope="module") -def yaml_file(): - return Path(__file__).parent / "data/parameters.yaml" +def data_dir(): + return Path(__file__).parent / "data" + + +@pytest.fixture(scope="module") +def yaml_file(data_dir: PosixPath): + return data_dir / "parameters.yaml" @pytest.fixture(scope="module", autouse=True) -def parameters_example() -> t.Dict: +def example_dict() -> t.Dict: return dict( string="abc", number=1, boolean=True, dictionary=dict( - empty_dict=dict(), + # empty_dict=dict(), string="def", number=2, ), diff --git a/tests/agora/data/parameters.yaml b/tests/agora/data/parameters.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93 --- /dev/null +++ b/tests/agora/data/parameters.yaml @@ -0,0 +1 @@ +{}