diff --git a/tests/conftest.py b/tests/conftest.py index 6593db7..0ff6b40 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,6 +27,18 @@ def _no_real_heart_lane(monkeypatch): monkeypatch.setenv("PYAUTO_HEART_GREEN", "off") +@pytest.fixture(autouse=True) +def _no_task_worktree_paths(monkeypatch): + """A task worktree's `activate.sh` (written by `bin/worktree.sh`) exports + the organ paths below, and resolvers honour them as hard overrides (e.g. + `_hygiene_repos.candidate_map_paths` and `PYAUTO_MIND`). CI sets none of + them, so start every test from CI's environment; a test that needs one + sets it itself (PyAutoBrain#677).""" + for name in ("PYAUTO_TASK", "PYAUTO_ROOT", "PYAUTO_BRAIN", "PYAUTO_MIND", + "PYAUTO_HEART", "PYAUTO_HANDS"): + monkeypatch.delenv(name, raising=False) + + @pytest.fixture(autouse=True) def _no_real_launch_probes(monkeypatch): """M3.6a (PyAutoBrain#659): `brief --check` and the watcher's first tick