From d1d2d433877ac80728adf4ba7d69fdcd36949d77 Mon Sep 17 00:00:00 2001 From: vominh1919 Date: Sun, 26 Apr 2026 19:53:50 +0700 Subject: [PATCH] fix(test): add skip marker for transcription tests requiring faster_whisper TestTranscribeLocalExtended patches faster_whisper.WhisperModel, which triggers an ImportError when the faster_whisper package is not installed. Added a pytest.mark.skipif marker using importlib.util.find_spec so these tests are gracefully skipped instead of failing with ModuleNotFoundError. --- tests/tools/test_transcription_tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tools/test_transcription_tools.py b/tests/tools/test_transcription_tools.py index 5e4a9ad716..e5b27d9e4d 100644 --- a/tests/tools/test_transcription_tools.py +++ b/tests/tools/test_transcription_tools.py @@ -414,6 +414,10 @@ class TestTranscribeLocalCommand: # _transcribe_local — additional tests # ============================================================================ +@pytest.mark.skipif( + not __import__("importlib").util.find_spec("faster_whisper"), + reason="faster_whisper not installed", +) class TestTranscribeLocalExtended: def test_model_reuse_on_second_call(self, tmp_path): """Second call with same model should NOT reload the model."""