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.
This commit is contained in:
vominh1919 2026-04-26 19:53:50 +07:00 committed by Teknium
parent 844d4a32ce
commit d1d2d43387

View file

@ -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."""