Skip to content

Commit

Permalink
fix: execstack
Browse files Browse the repository at this point in the history
  • Loading branch information
chidiwilliams committed Jan 4, 2024
1 parent 5e1d47c commit 32f642d
Showing 1 changed file with 15 additions and 30 deletions.
45 changes: 15 additions & 30 deletions tests/transcriber_benchmarks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,44 +43,29 @@ def transcribe(qtbot, transcriber: FileTranscriber):


@pytest.mark.parametrize(
"transcriber",
"transcriber, model",
[
pytest.param(
WhisperCppFileTranscriber(
task=(
get_task(
TranscriptionModel(
model_type=ModelType.WHISPER_CPP,
whisper_model_size=WhisperModelSize.TINY,
)
)
)
WhisperCppFileTranscriber,
TranscriptionModel(
model_type=ModelType.WHISPER_CPP,
whisper_model_size=WhisperModelSize.TINY,
),
id="Whisper.cpp - Tiny",
),
pytest.param(
WhisperFileTranscriber(
task=(
get_task(
TranscriptionModel(
model_type=ModelType.WHISPER,
whisper_model_size=WhisperModelSize.TINY,
)
)
)
WhisperFileTranscriber,
TranscriptionModel(
model_type=ModelType.WHISPER,
whisper_model_size=WhisperModelSize.TINY,
),
id="Whisper - Tiny",
),
pytest.param(
WhisperFileTranscriber(
task=(
get_task(
TranscriptionModel(
model_type=ModelType.FASTER_WHISPER,
whisper_model_size=WhisperModelSize.TINY,
)
)
)
WhisperFileTranscriber,
TranscriptionModel(
model_type=ModelType.FASTER_WHISPER,
whisper_model_size=WhisperModelSize.TINY,
),
id="Faster Whisper - Tiny",
marks=pytest.mark.skipif(
Expand All @@ -95,6 +80,6 @@ def transcribe(qtbot, transcriber: FileTranscriber):
@pytest.mark.skipif(
platform.system() == "Linux", reason="Avoid execstack errors on Snap"
)
def test_should_transcribe_and_benchmark(qtbot, benchmark, transcriber):
segments = benchmark(transcribe, qtbot, transcriber)
def test_should_transcribe_and_benchmark(qtbot, benchmark, transcriber, model):
segments = benchmark(transcribe, qtbot, transcriber(task=get_task(model)))
assert len(segments) > 0

0 comments on commit 32f642d

Please sign in to comment.