From b6147f0845b007dd50d4d5188182bf843f3111bb Mon Sep 17 00:00:00 2001 From: Chidi Williams Date: Fri, 5 Jan 2024 12:55:12 +0000 Subject: [PATCH] fix: execstack --- .../widgets/transcription_task_folder_watcher_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/widgets/transcription_task_folder_watcher_test.py b/tests/widgets/transcription_task_folder_watcher_test.py index faafdd7f3..aa8247f47 100644 --- a/tests/widgets/transcription_task_folder_watcher_test.py +++ b/tests/widgets/transcription_task_folder_watcher_test.py @@ -4,7 +4,7 @@ from pytestqt.qtbot import QtBot -from buzz.model_loader import TranscriptionModel +from buzz.model_loader import TranscriptionModel, ModelType from buzz.transcriber import ( Task, DEFAULT_WHISPER_TEMPERATURE, @@ -24,6 +24,12 @@ class TestTranscriptionTaskFolderWatcher: + def default_model(self): + model_type = next( + model_type for model_type in ModelType if model_type.is_available() + ) + return TranscriptionModel(model_type=model_type) + def test_should_add_task_not_in_tasks(self, qtbot: QtBot): input_directory = mkdtemp() watcher = TranscriptionTaskFolderWatcher( @@ -35,7 +41,7 @@ def test_should_add_task_not_in_tasks(self, qtbot: QtBot): file_transcription_options=FileTranscriptionPreferences( language=None, task=Task.TRANSCRIBE, - model=TranscriptionModel(), + model=self.default_model(), word_level_timings=False, temperature=DEFAULT_WHISPER_TEMPERATURE, initial_prompt="",