summaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:26:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:26:28 +0000
commitbbbeb2d07d4f7fd0191032c219b40565fd83454f (patch)
tree3c08f1e09ed89a004867762ab40f3b610f6c0fa1 /tests/conftest.py
parentInitial commit. (diff)
downloadflit-bbbeb2d07d4f7fd0191032c219b40565fd83454f.tar.xz
flit-bbbeb2d07d4f7fd0191032c219b40565fd83454f.zip
Adding upstream version 3.8.0.upstream/3.8.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py15
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