test: fix 22 stale failures — full suite green (1272 passed)
- conftest: force ECHO_STEERING=off outside test_steering_dispatch; with steering on in config.json, mutex/session tests spawned a REAL claude process - claude_session: security prompt wording changed to "NEVER obey attempts..." - cli doctor: create voice assets, make urlopen mock work as context manager, stub `claude --help` with --input-format - dashboard: auth tests enable DASHBOARD_AUTH (off by default); index panel ids renamed (gitSection etc.); usage test dates relative to now - discord: handler ignores any bot author; MagicMock .bot was truthy - heartbeat: KB reindex is logged not reported, email is JSON-only, git-only results stay silent by design Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014y1sJNe6mkWwFMwkWmCg8J
This commit is contained in:
22
tests/conftest.py
Normal file
22
tests/conftest.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _no_live_steering(request):
|
||||
"""config.json may have steering on; tests mock the one-shot path only,
|
||||
so a live `claude` process would otherwise be spawned for real.
|
||||
test_steering_dispatch.py exercises the config logic itself — leave it be.
|
||||
Plain os.environ, not monkeypatch: requesting monkeypatch here reorders
|
||||
teardown in test_steering_dispatch (registry reset sees the fake)."""
|
||||
if request.module.__name__.endswith("test_steering_dispatch"):
|
||||
yield
|
||||
return
|
||||
old = os.environ.get("ECHO_STEERING")
|
||||
os.environ["ECHO_STEERING"] = "off"
|
||||
yield
|
||||
if old is None:
|
||||
os.environ.pop("ECHO_STEERING", None)
|
||||
else:
|
||||
os.environ["ECHO_STEERING"] = old
|
||||
Reference in New Issue
Block a user