Skip to content

Commit

Permalink
fix: execstack
Browse files Browse the repository at this point in the history
  • Loading branch information
chidiwilliams committed Jan 5, 2024
1 parent 0fb2e11 commit d17677c
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions tests/widgets/model_type_combo_box_test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
import sys

import pytest

from buzz.widgets.model_type_combo_box import ModelTypeComboBox


class TestModelTypeComboBox:
def test_should_display_items(self, qtbot):
@pytest.mark.parametrize(
"model_types",
[
pytest.param(
[
"Whisper",
"Whisper.cpp",
"Hugging Face",
"Faster Whisper",
"OpenAI Whisper API",
],
pytest.mark.skipif(sys.platform == "linux", reason="Skip on Linux"),
),
pytest.param(
["Whisper.cpp", "OpenAI Whisper API"],
pytest.mark.skipif(sys.platform != "linux", reason="Skip on non-Linux"),
),
],
)
def test_should_display_items(self, qtbot, model_types):
widget = ModelTypeComboBox()
qtbot.add_widget(widget)

assert widget.count() == 5
assert widget.itemText(0) == "Whisper"
assert widget.itemText(1) == "Whisper.cpp"
assert widget.itemText(2) == "Hugging Face"
assert widget.itemText(3) == "Faster Whisper"
assert widget.itemText(4) == "OpenAI Whisper API"
assert widget.count() == len(model_types)
for index, model_type in enumerate(model_types):
assert widget.itemText(index) == model_type

0 comments on commit d17677c

Please sign in to comment.