diff --git a/.gitignore b/.gitignore index f20f8b1c..4c9ce401 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ coverage.xml .hypothesis/ .pytest_cache/ cover/ +tagstudio/tests/fixtures/library/* # Translations *.mo diff --git a/tagstudio/tests/conftest.py b/tagstudio/tests/conftest.py index 036acd8c..2c5cd225 100644 --- a/tagstudio/tests/conftest.py +++ b/tagstudio/tests/conftest.py @@ -25,9 +25,15 @@ def test_tag(): @pytest.fixture def test_library(): + lib_dir = CWD / "fixtures" / "library" + lib = Library() - ret_code = lib.open_library(CWD / "fixtures" / "library") + ret_code = lib.open_library(lib_dir) assert ret_code == 1 + # create files for the entries + for entry in lib.entries: + (lib_dir / entry.filename).touch() + yield lib diff --git a/tagstudio/tests/fixtures/library/bar.txt b/tagstudio/tests/fixtures/library/bar.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tagstudio/tests/fixtures/library/foo.txt b/tagstudio/tests/fixtures/library/foo.txt deleted file mode 100644 index e69de29b..00000000