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:
@@ -414,6 +414,10 @@ class TestTranscribeLocalCommand:
|
|||||||
# _transcribe_local — additional tests
|
# _transcribe_local — additional tests
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
|
@pytest.mark.skipif(
|
||||||
|
not __import__("importlib").util.find_spec("faster_whisper"),
|
||||||
|
reason="faster_whisper not installed",
|
||||||
|
)
|
||||||
class TestTranscribeLocalExtended:
|
class TestTranscribeLocalExtended:
|
||||||
def test_model_reuse_on_second_call(self, tmp_path):
|
def test_model_reuse_on_second_call(self, tmp_path):
|
||||||
"""Second call with same model should NOT reload the model."""
|
"""Second call with same model should NOT reload the model."""
|
||||||
|
|||||||
Reference in New Issue
Block a user