test: convert null-local-config assertion from exact-dict to invariant

The exact kwargs snapshot broke when VAD hardening added keys — the
test's real contract is 'null stt.local: must not crash or force
language/prompt'. Baseline kwargs are pinned by the dedicated suite.
This commit is contained in:
Teknium 2026-07-28 23:41:57 -07:00
parent bf8004e3a8
commit bff2206972

View file

@ -237,7 +237,14 @@ class TestTranscribeLocal:
result = _transcribe_local(str(audio_file), "base")
assert result["success"] is True
assert mock_model.transcribe.call_args.kwargs == {"beam_size": 5}
# Contract: null `stt.local:` config must not crash, and must not
# force a language or initial_prompt. Baseline kwargs (beam_size,
# VAD hardening) are pinned by test_stt_silence_hallucinations —
# don't exact-match the dict here (change-detector).
kwargs = mock_model.transcribe.call_args.kwargs
assert kwargs["beam_size"] == 5
assert "language" not in kwargs
assert "initial_prompt" not in kwargs
def test_not_installed(self):
with patch("tools.transcription_tools._HAS_FASTER_WHISPER", False):