Skip to content

Commit 2ff1e59

Browse files
committed
TST: make timeplot testcase work for pyside6 too
1 parent caaf030 commit 2ff1e59

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pydm/tests/widgets/test_timeplot.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from unittest import mock
77
from ...widgets.channel import PyDMChannel
88
from ...widgets.timeplot import TimePlotCurveItem, PyDMTimePlot, TimeAxisItem, MINIMUM_BUFFER_SIZE, DEFAULT_BUFFER_SIZE
9-
from ...utilities import remove_protocol
9+
from ...utilities import remove_protocol, ACTIVE_QT_WRAPPER, QtWrapperTypes
1010
from qtpy.QtTest import QSignalSpy
1111
from unittest.mock import MagicMock
1212

@@ -44,9 +44,12 @@ def test_timeplotcurveitem_severityChanged_updates_attributes_and_emits(timeplot
4444
assert timeplotcurveitem_widget.severity_raw == 2
4545
assert timeplotcurveitem_widget.severity == "MAJOR"
4646

47-
assert len(severity_spy) == 1
48-
assert severity_spy[0] == [2]
49-
47+
if ACTIVE_QT_WRAPPER == QtWrapperTypes.PYQT5:
48+
assert len(severity_spy) == 1
49+
assert severity_spy[0] == [2]
50+
else:
51+
assert severity_spy.count() == 1
52+
assert severity_spy.at(0) == [2]
5053

5154
def test_timeplotcurveitem_alarm_severity_changed_valid_values(timeplotcurveitem_widget):
5255
"""

0 commit comments

Comments
 (0)