Skip to content

Commit 37c603f

Browse files
committed
Update ColorModeWidget import in test_theme.py
1 parent 5564943 commit 37c603f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

plotpy/tests/widgets/test_theme.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@
1414

1515
import pytest
1616
from guidata import qthelpers as qth
17-
from guidata.tests.widgets.test_theme import TestWidget as GuidataTestWidget
17+
18+
try:
19+
# guidata > V2.6.2
20+
from guidata.tests.widgets.test_theme import ColorModeWidget as GuidataWidget
21+
except ImportError:
22+
# guidata V2.6.2
23+
from guidata.tests.widgets.test_theme import (
24+
TestWidget as GuidataWidget, # noqa: F401
25+
)
1826
from qtpy import QtWidgets as QW
1927

2028
from plotpy.builder import make
@@ -23,7 +31,7 @@
2331
from plotpy.tests import data as ptd
2432

2533

26-
class TestWidget(GuidataTestWidget):
34+
class ColorModeWidget(GuidataWidget):
2735
"""Testing color mode switching for PlotPy and guidata widgets"""
2836

2937
SIZE = (1400, 600)
@@ -56,7 +64,7 @@ def test_dark_light_themes(
5664
) -> None:
5765
"""Test dark/light theme switching"""
5866
with qth.qt_app_context(exec_loop=True):
59-
widget = TestWidget(default=qth.AUTO if default is None else default)
67+
widget = ColorModeWidget(default=qth.AUTO if default is None else default)
6068
widget.show()
6169

6270

0 commit comments

Comments
 (0)