Skip to content

Commit da78315

Browse files
- temporarily disabled use of pytest-cleanslate, using pytest-isolate
instead, to work around crashes in more recent Python versions. Unfortunately, this removes isolation during test collection;
1 parent a64b009 commit da78315

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies = [
2424
"tqdm",
2525
"slipcover>=1.0.13",
2626
"pytest-cleanslate>=1.0.6", # 1.0.6 fixes collection error bug
27+
"pytest-isolate",
2728
"pytest-repeat",
2829
"litellm>=1.33.1"
2930
]

src/coverup/testrunner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def measure_test_coverage(*, test: str, tests_dir: Path, pytest_args='',
2222
p = await subprocess_run([sys.executable, '-m', 'slipcover', *(('--branch',) if branch_coverage else ()),
2323
'--json', '--out', j.name,
2424
'-m', 'pytest', *pytest_args.split(),
25-
*(('--cleanslate',) if isolate_tests else ()),
25+
*(('--isolate',) if isolate_tests else ()),
2626
'-qq', '-x', '--disable-warnings', t.name],
2727
check=True, timeout=60)
2828
if log_write:
@@ -51,7 +51,7 @@ def measure_suite_coverage(*, tests_dir: Path, source_dir: T.Optional[Path], pyt
5151
*(('--source', source_dir) if source_dir else ()),
5252
*(('--branch',) if branch_coverage else ()),
5353
'--json', '--out', j.name,
54-
'-m', 'pytest', *pytest_args.split(), *(('--cleanslate',) if isolate_tests else ()),
54+
'-m', 'pytest', *pytest_args.split(), *(('--isolate',) if isolate_tests else ()),
5555
'--disable-warnings', '-x', tests_dir]
5656

5757
if trace: trace(command)

0 commit comments

Comments
 (0)