Skip to content

Commit

Permalink
tests: better support for parallel testing
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Mar 7, 2025
1 parent 2bb342b commit 8395e52
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,14 @@ def packages_path():

def generate_package_path_fixture(package_name):
@pytest.fixture
def fixture(packages_path):
return os.path.join(packages_path, package_name)
def fixture(packages_path, tmp_path):
package_path = os.path.join(packages_path, package_name)
if 'flit' in package_name:
return package_path

new_path = tmp_path / package_name
shutil.copytree(package_path, new_path)
return str(new_path)

return fixture

Expand Down

0 comments on commit 8395e52

Please # to comment.