[eric] tests: reset metrics-dir cache in conftest, analyzer tests wrote to a stale dir

This commit is contained in:
ciregenz
2026-06-05 00:55:14 -07:00
parent 88088a9564
commit ed3ffd2de1
+7
View File
@@ -28,6 +28,13 @@ def _isolate_browser_state(monkeypatch):
m.clear(wipe_disk=True)
except Exception:
pass
# metrics caches its dir at first use; drop it so each test writes
# where ITS env var points, not where the first test's pointed
try:
from backend.apps.agents.browser import browser_metrics as _bm
_bm._metrics_dir_cache = None
except Exception:
pass
_reset()
yield
_reset()