mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-26 03:03:42 +00:00
create testing library files ad-hoc (#292)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user