mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2024-07-30 21:27:34 +00:00
create testing library files ad-hoc (#292)
This commit is contained in:
parent
82946cb0b8
commit
8e065ca8ac
4 changed files with 8 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -55,6 +55,7 @@ coverage.xml
|
|||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
tagstudio/tests/fixtures/library/*
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
0
tagstudio/tests/fixtures/library/bar.txt
vendored
0
tagstudio/tests/fixtures/library/bar.txt
vendored
0
tagstudio/tests/fixtures/library/foo.txt
vendored
0
tagstudio/tests/fixtures/library/foo.txt
vendored
Loading…
Reference in a new issue