Skip to content
This repository was archived by the owner on Aug 1, 2026. It is now read-only.

Commit ebb60ae

Browse files
committed
FIX: Add --cache-clear flag to all pytest commands
Added --cache-clear to prevent stale cached test results: - Phase 2: SegWave tests (test_segwave_core.py, test_segwave_cli.py, test_print_all_md.py) - Phase 3: Multi-ring validation tests - Phase 4: Scripts tests (SSZ kernel, invariants, segmenter, cosmo) - Phase 5: Cosmos tests (multi-body sigma) This ensures pytest always runs fresh tests without cached results, fixing the persistent failures in test_segwave_core.py and test_multi_body_sigma.py. Previous cache clearing (shutil.rmtree) was insufficient because pytest caches results during execution. --cache-clear forces fresh collection.
1 parent b3c9c26 commit ebb60ae

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

run_full_suite.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ def flush(self):
310310
print_header("PHASE 2: SEGWAVE TESTS", "-")
311311

312312
tests_phase2 = [
313-
(["python", "-m", "pytest", "tests/test_segwave_core.py", "-s", "-v", "--tb=short"],
313+
(["python", "-m", "pytest", "tests/test_segwave_core.py", "-s", "-v", "--tb=short", "--cache-clear"],
314314
"SegWave Core Math Tests", 60, False), # Physics - show in summary
315-
(["python", "-m", "pytest", "tests/test_segwave_cli.py", "-s", "-v", "--tb=short"],
315+
(["python", "-m", "pytest", "tests/test_segwave_cli.py", "-s", "-v", "--tb=short", "--cache-clear"],
316316
"SegWave CLI & Dataset Tests", 120, True), # Technical - silent
317-
(["python", "-m", "pytest", "tests/test_print_all_md.py", "-s", "-v", "--tb=short"],
317+
(["python", "-m", "pytest", "tests/test_print_all_md.py", "-s", "-v", "--tb=short", "--cache-clear"],
318318
"MD Print Tool Tests", 30, True), # Technical - silent
319319
]
320320

@@ -335,7 +335,7 @@ def flush(self):
335335

336336
ring_test_file = Path("tests/test_ring_datasets.py")
337337
if ring_test_file.exists():
338-
cmd = ["python", "-m", "pytest", str(ring_test_file), "-s", "-v", "--tb=short"]
338+
cmd = ["python", "-m", "pytest", str(ring_test_file), "-s", "-v", "--tb=short", "--cache-clear"]
339339
success, elapsed = run_command(cmd, "Multi-Ring Dataset Validation Tests", 60, check=False)
340340
results["Multi-Ring Validation Tests"] = {"success": success, "time": elapsed}
341341
else:
@@ -351,15 +351,15 @@ def flush(self):
351351
print_header("PHASE 4: SCRIPTS/TESTS", "-")
352352

353353
tests_phase4 = [
354-
(["python", "-m", "pytest", "scripts/tests/test_ssz_kernel.py", "-s", "-v", "--tb=short"],
354+
(["python", "-m", "pytest", "scripts/tests/test_ssz_kernel.py", "-s", "-v", "--tb=short", "--cache-clear"],
355355
"SSZ Kernel Tests", 60),
356-
(["python", "-m", "pytest", "scripts/tests/test_ssz_invariants.py", "-s", "-v", "--tb=short"],
356+
(["python", "-m", "pytest", "scripts/tests/test_ssz_invariants.py", "-s", "-v", "--tb=short", "--cache-clear"],
357357
"SSZ Invariants Tests", 60),
358-
(["python", "-m", "pytest", "scripts/tests/test_segmenter.py", "-s", "-v", "--tb=short"],
358+
(["python", "-m", "pytest", "scripts/tests/test_segmenter.py", "-s", "-v", "--tb=short", "--cache-clear"],
359359
"Segmenter Tests", 60),
360-
(["python", "-m", "pytest", "scripts/tests/test_cosmo_fields.py", "-s", "-v", "--tb=short"],
360+
(["python", "-m", "pytest", "scripts/tests/test_cosmo_fields.py", "-s", "-v", "--tb=short", "--cache-clear"],
361361
"Cosmo Fields Tests", 60),
362-
(["python", "-m", "pytest", "scripts/tests/test_cosmo_multibody.py", "-s", "-v", "--tb=short"],
362+
(["python", "-m", "pytest", "scripts/tests/test_cosmo_multibody.py", "-s", "-v", "--tb=short", "--cache-clear"],
363363
"Cosmo Multibody Tests", 60),
364364
]
365365

@@ -377,7 +377,7 @@ def flush(self):
377377
print_header("PHASE 5: COSMOS TESTS", "-")
378378

379379
tests_phase5 = [
380-
(["python", "-m", "pytest", "tests/cosmos/", "-s", "-v", "--tb=short"],
380+
(["python", "-m", "pytest", "tests/cosmos/", "-s", "-v", "--tb=short", "--cache-clear"],
381381
"Cosmos Multi-Body Sigma Tests", 60),
382382
]
383383

0 commit comments

Comments
 (0)