Function
datadir
(original_datadir, tmpdir)
Source from the content-addressed store, hash-verified
| 27 | |
| 28 | @pytest.fixture |
| 29 | def datadir(original_datadir, tmpdir): |
| 30 | # Method from: https://github.com/gabrielcnr/pytest-datadir |
| 31 | # License: MIT |
| 32 | import shutil |
| 33 | |
| 34 | result = Path(str(tmpdir.join(original_datadir.stem))) |
| 35 | if original_datadir.is_dir(): |
| 36 | shutil.copytree(str(original_datadir), str(result)) |
| 37 | else: |
| 38 | result.mkdir() |
| 39 | return result |
| 40 | |
| 41 | |
| 42 | @pytest.fixture |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…