mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
Three independent pre-existing test-hygiene regressions on main, all surfaced as cascading CI failures: 1. tests/test_cli/test_wrap_copilot.py (from #229) mutated sys.modules["headroom.cli.main"] with a fake click.Group() at module-import time and never restored it. Any later test that did `from headroom.cli.main import main` got an empty group with no version option and no registered subcommands, breaking ~20 test_cli/* and test_cli_proxy_env.py tests. Rewrite to import the real `main` directly — the fake-group indirection served no purpose. 2. tests/test_proxy_copilot_auth_hooks.py (from #229) installed fake httpx / fastapi.responses / headroom.proxy.* modules into sys.modules inside a helper called from test functions, never cleaned up. Later tests that imported ASGITransport or JSONResponse hit the fakes and failed with ImportError. Switch the helper to monkeypatch.setitem so the fakes are scoped to the owning test. 3. tests/test_release_version.py hardcoded canonical=0.5.25 in the subprocess-output assertion; the project version in pyproject.toml has since bumped to 0.9.1. Compute the expected value dynamically via get_canonical_version(ROOT) so the test tracks pyproject. |
||
|---|---|---|
| .. | ||
| test_init_cli.py | ||
| test_install_cli.py | ||
| test_main_help_version.py | ||
| test_mcp.py | ||
| test_wrap_bridge.py | ||
| test_wrap_copilot.py | ||
| test_wrap_openclaw.py | ||
| test_wrap_persistent.py | ||