1from pathlib import Path
2import pytest
3from shutil import copytree
4
5samples_dir = Path(__file__).parent / 'samples'
6
7@pytest.fixture
8def copy_sample(tmp_path):
9    """Copy a subdirectory from the samples dir to a temp dir"""
10    def copy(dirname):
11        dst = tmp_path / dirname
12        copytree(str(samples_dir / dirname), str(dst))
13        return dst
14
15    return copy
16