From 39b69624c475c309a407ee5605883a94ba1cfe67 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Sun, 4 Oct 2026 16:44:42 +0800 Subject: [PATCH] Format failed-speech diagnostic helper and regression coverage Signed-off-by: tzhouam (cherry picked from commit e81ae8f66fae54b4907df80b58247e9334306e03) --- tests/helpers/assertions.py | 4 +++- tests/helpers/tests/test_assertions.py | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/helpers/assertions.py b/tests/helpers/assertions.py index 7694761c6..9587d5591 100644 --- a/tests/helpers/assertions.py +++ b/tests/helpers/assertions.py @@ -1001,7 +1001,9 @@ def _assert_transcript_matches( ) -def _retain_failed_speech_audio(audio_bytes: bytes | None, transcript: str, expected_text: Any, error: AssertionError) -> None: +def _retain_failed_speech_audio( + audio_bytes: bytes | None, transcript: str, expected_text: Any, error: AssertionError +) -> None: """Retain the exact ASR input when a CI speech-content assertion fails.""" directory = os.environ.get("VLLM_OMNI_FAILED_SPEECH_AUDIO_DIR") if not directory or not audio_bytes: diff --git a/tests/helpers/tests/test_assertions.py b/tests/helpers/tests/test_assertions.py index b4e54d094..2fca68d65 100644 --- a/tests/helpers/tests/test_assertions.py +++ b/tests/helpers/tests/test_assertions.py @@ -295,9 +295,7 @@ def test_failed_speech_capture_retains_exact_asr_input_and_original_failure( @pytest.mark.parametrize("capture_enabled", [False, True]) @pytest.mark.parametrize("content_failure", [False, True]) -def test_speech_capture_is_opt_in_and_does_not_write_successes( - monkeypatch, tmp_path, capture_enabled, content_failure -): +def test_speech_capture_is_opt_in_and_does_not_write_successes(monkeypatch, tmp_path, capture_enabled, content_failure): directory = tmp_path / "failed_audio" if capture_enabled: monkeypatch.setenv("VLLM_OMNI_FAILED_SPEECH_AUDIO_DIR", str(directory))