diff options
Diffstat (limited to '')
-rw-r--r-- | tests/conftest.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..4c5ecef --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,15 @@ +from pathlib import Path +import pytest +from shutil import copytree + +samples_dir = Path(__file__).parent / 'samples' + +@pytest.fixture +def copy_sample(tmp_path): + """Copy a subdirectory from the samples dir to a temp dir""" + def copy(dirname): + dst = tmp_path / dirname + copytree(str(samples_dir / dirname), str(dst)) + return dst + + return copy |