[eric] tests: isolate the session dir, my fixtures were writing transcripts into the real data folder

This commit is contained in:
ciregenz
2026-07-31 21:38:26 -07:00
parent 5e99bb7943
commit d756ad9897
+7 -1
View File
@@ -32,7 +32,13 @@ from backend.apps.workflows.reconcile_references import reconcile_workflow_sessi
@pytest.fixture(autouse=True)
def p_wf_env(isolated_workflows_data, reset_scheduler_state):
def p_wf_env(isolated_workflows_data, reset_scheduler_state, tmp_path, monkeypatch):
# isolated_workflows_data isolates workflows but NOT sessions, so without this the fixture
# transcripts below land in the developer's real backend/data/sessions and stay there.
import backend.apps.agents.manager.session.session_store as store
sessions = tmp_path / "sessions"
sessions.mkdir()
monkeypatch.setattr(store, "sessions_dir", lambda: str(sessions))
yield