From bff22069727ae7b7f8ede8d7da110ab0f1558d69 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 28 Jul 2026 23:41:57 -0700 Subject: [PATCH] test: convert null-local-config assertion from exact-dict to invariant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tests/tools/test_transcription.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_transcription.py b/tests/tools/test_transcription.py index 8ab4d646a57..e31c0239c3a 100644 --- a/tests/tools/test_transcription.py +++ b/tests/tools/test_transcription.py @@ -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):