mirror of
https://github.com/usestrix/strix.git
synced 2026-11-16 09:21:54 +00:00
test(runner): give the mock settings a telemetry namespace
The runner now reads settings.telemetry.run_record_timings (core/runner.py, config/models.py), but the test_runner_* helpers build a SimpleNamespace settings mock without a telemetry attribute, so 18 tests fail with AttributeError on main. Add telemetry=SimpleNamespace(run_record_timings=False) to each mock. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
14cc948c36
commit
d21e58bc6c
5 changed files with 5 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ def _wire_runner(monkeypatch: pytest.MonkeyPatch, tmp_path: Any) -> None:
|
|||
extra_body=None,
|
||||
),
|
||||
runtime=types.SimpleNamespace(max_context_images=3),
|
||||
telemetry=types.SimpleNamespace(run_record_timings=False),
|
||||
)
|
||||
monkeypatch.setattr(runner, "load_settings", lambda: settings)
|
||||
monkeypatch.setattr(runner, "configure_sdk_model_defaults", lambda _settings: None)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ def _settings() -> Any:
|
|||
extra_body=None,
|
||||
),
|
||||
runtime=types.SimpleNamespace(max_context_images=3),
|
||||
telemetry=types.SimpleNamespace(run_record_timings=False),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ async def test_persistent_rate_limit_stops_gracefully(
|
|||
extra_body=None,
|
||||
),
|
||||
runtime=types.SimpleNamespace(max_context_images=3),
|
||||
telemetry=types.SimpleNamespace(run_record_timings=False),
|
||||
)
|
||||
monkeypatch.setattr(runner, "load_settings", lambda: settings)
|
||||
monkeypatch.setattr(runner, "configure_sdk_model_defaults", lambda _settings: None)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ def _patch_engine_scaffold(
|
|||
extra_body=None,
|
||||
),
|
||||
runtime=types.SimpleNamespace(max_context_images=3),
|
||||
telemetry=types.SimpleNamespace(run_record_timings=False),
|
||||
)
|
||||
monkeypatch.setattr(runner, "load_settings", lambda: settings)
|
||||
monkeypatch.setattr(runner, "configure_sdk_model_defaults", lambda _settings: None)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ def _settings() -> Any:
|
|||
extra_body=None,
|
||||
),
|
||||
runtime=types.SimpleNamespace(max_context_images=3),
|
||||
telemetry=types.SimpleNamespace(run_record_timings=False),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue