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()