diff --git a/agent-office/tests/test_lotto_task_wrap.py b/agent-office/tests/test_lotto_task_wrap.py index 5cf72dc..965b21f 100644 --- a/agent-office/tests/test_lotto_task_wrap.py +++ b/agent-office/tests/test_lotto_task_wrap.py @@ -18,6 +18,8 @@ db.DB_PATH = _TMP @pytest.fixture(autouse=True) def fresh_db(): + # Re-patch DB_PATH at the start of every test (cross-file isolation) + db.DB_PATH = _TMP gc.collect() if os.path.exists(_TMP): os.remove(_TMP) diff --git a/agent-office/tests/test_sync_evolver_activity.py b/agent-office/tests/test_sync_evolver_activity.py index 88b39ad..8ce1826 100644 --- a/agent-office/tests/test_sync_evolver_activity.py +++ b/agent-office/tests/test_sync_evolver_activity.py @@ -19,6 +19,8 @@ db.DB_PATH = _TMP @pytest.fixture(autouse=True) def fresh_db(): + # Re-patch DB_PATH at the start of every test (cross-file isolation) + db.DB_PATH = _TMP gc.collect() if os.path.exists(_TMP): os.remove(_TMP)