Skip to content

Commit

Permalink
Rename BaseTestWidget to BaseColorModeWidget and TestWidget to ColorM…
Browse files Browse the repository at this point in the history
…odeWidget
  • Loading branch information
PierreRaybaut committed Aug 6, 2024
1 parent b26707c commit ce9ce9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions guidata/tests/widgets/test_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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()


Expand Down

0 comments on commit ce9ce9d

Please sign in to comment.