test: add qtbot to test to fix windows segfault (#165)

* test: fix windows test

* test on windows

* try ubuntu

* remove ubuntu
This commit is contained in:
Talley Lambert
2023-05-20 15:53:45 -04:00
committed by GitHub
parent 1fb46854d4
commit f990fea78c
2 changed files with 9 additions and 2 deletions

View File

@@ -36,6 +36,12 @@ jobs:
- python-version: "3.11"
platform: macos-latest
backend: pyside6
- python-version: "3.10"
platform: windows-latest
backend: pyside6
- python-version: "3.11"
platform: windows-latest
backend: pyside6
# python 3.7
- python-version: 3.7

View File

@@ -67,9 +67,10 @@ def test_labeled_signals(cls, qtbot):
@pytest.mark.parametrize(
"cls", [QLabeledDoubleSlider, QLabeledRangeSlider, QLabeledSlider]
)
def test_editing_finished_signal(cls):
slider = cls()
def test_editing_finished_signal(cls, qtbot):
mock = Mock()
slider = cls()
qtbot.addWidget(slider)
slider.editingFinished.connect(mock)
if hasattr(slider, "_label"):
slider._label.editingFinished.emit()