From ce9ce9d2de6b4e46e1a0b1fc89b7b1728bbe1a34 Mon Sep 17 00:00:00 2001 From: Pierre Raybaut Date: Tue, 6 Aug 2024 14:04:42 +0200 Subject: [PATCH] Rename BaseTestWidget to BaseColorModeWidget and TestWidget to ColorModeWidget --- guidata/tests/widgets/test_theme.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guidata/tests/widgets/test_theme.py b/guidata/tests/widgets/test_theme.py index b0b7a2f..611764b 100644 --- a/guidata/tests/widgets/test_theme.py +++ b/guidata/tests/widgets/test_theme.py @@ -22,13 +22,13 @@ from guidata.widgets.console import Console -class BaseTestWidget(QW.QWidget): +class BaseColorModeWidget(QW.QWidget): """Base class for testing dark/light theme switching""" SIZE = (1200, 600) def __init__(self, default: Literal["light", "dark", "auto"] = qth.AUTO) -> None: - super(BaseTestWidget, self).__init__() + super(BaseColorModeWidget, self).__init__() self.resize(*self.SIZE) self.default_theme = default self.combo: QW.QComboBox | None = None @@ -68,7 +68,7 @@ def closeEvent(self, event): event.accept() -class TestWidget(BaseTestWidget): +class ColorModeWidget(BaseColorModeWidget): """Testing color mode switching for guidata's widgets: code editor and console""" def __init__(self, default: Literal["light", "dark", "auto"] = qth.AUTO) -> None: @@ -119,7 +119,7 @@ def test_dark_light_themes( ) -> None: """Test dark/light theme switching""" with qth.qt_app_context(exec_loop=True): - widget = TestWidget(default=qth.AUTO if default is None else default) + widget = ColorModeWidget(default=qth.AUTO if default is None else default) widget.show()