From 4d6034e0da72dc77c9fee34fbe322600bfafa30f Mon Sep 17 00:00:00 2001 From: Chidi Williams Date: Fri, 5 Jan 2024 12:42:34 +0000 Subject: [PATCH] fix: execstack --- .../preferences_dialog/models_preferences_widget_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/widgets/preferences_dialog/models_preferences_widget_test.py b/tests/widgets/preferences_dialog/models_preferences_widget_test.py index 92fd935ec..1866bc1e7 100644 --- a/tests/widgets/preferences_dialog/models_preferences_widget_test.py +++ b/tests/widgets/preferences_dialog/models_preferences_widget_test.py @@ -6,7 +6,6 @@ from pytestqt.qtbot import QtBot from buzz.model_loader import ( - get_whisper_file_path, WhisperModelSize, TranscriptionModel, ModelType, @@ -20,9 +19,10 @@ class TestModelsPreferencesWidget: @pytest.fixture(scope="class") def clear_model_cache(self): - file_path = get_whisper_file_path(size=WhisperModelSize.TINY) - if os.path.isfile(file_path): - os.remove(file_path) + for model_type in ModelType: + path = TranscriptionModel(model_type=model_type).get_local_model_path() + if path and os.path.isfile(path): + os.remove(path) def test_should_show_model_list(self, qtbot): widget = ModelsPreferencesWidget()