From f06643fcd642d6e253fb371f50cd746440a0318a Mon Sep 17 00:00:00 2001 From: ciregenz Date: Thu, 3 Sep 2026 12:44:30 -0700 Subject: [PATCH] [eric] tests: the suite runs on a throwaway data root; one test wrote an Output named probe past its patch and 330 runs left 330 probe apps in the real Applications window Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01C9zwUaHucUgrdxvK8FvjYT --- backend/tests/conftest.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index 1ce1a075..635ee185 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -12,9 +12,18 @@ The two pre-existing workflow suites still carry their own local copies; new suites lean on these shared ones instead of re-pasting the boilerplate. """ -import asyncio import os +import sys import tempfile + +# The suite used to run against the dev machine's REAL data root: one test saved an Output named "probe" +# through a module its patch never reached, and 330 suite runs left 330 probe apps in Eric's Applications +# window. The root is chosen when backend.config.paths is first imported, so this must run before any +# backend import, and it says so loudly if it is too late. +assert "backend.config.paths" not in sys.modules, "conftest must set OPENSWARM_DATA_ROOT before backend.config.paths is imported" +os.environ["OPENSWARM_DATA_ROOT"] = tempfile.mkdtemp(prefix="osw_test_data_") + +import asyncio from datetime import datetime, timezone from types import SimpleNamespace