import pytest from distutils import dir_util @pytest.fixture def e3_wrapper(tmpdir): dir_util.copy_tree("data", str(tmpdir)) yield tmpdir def test_patch(e3_wrapper): print(e3_wrapper) assert False