We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b4e6465 + b2ff36f commit 867ed8aCopy full SHA for 867ed8a
test/test_themes.py
@@ -76,6 +76,20 @@ def test_copy(self) -> None:
76
self.assertNotEqual(theme.background_color, theme_copy.background_color)
77
self.assertNotEqual(theme.background_color, pygame_menu.themes.THEME_DEFAULT.background_color)
78
79
+ # Test attribute copy
80
+ color_main = (29, 120, 107, 255)
81
+ color_copy = (241, 125, 1)
82
+ theme_white = pygame_menu.themes.Theme(
83
+ scrollbar_thick=50,
84
+ selection_color=color_main
85
+ )
86
+
87
+ sub_theme_white = theme_white.copy()
88
+ sub_theme_white.selection_color = color_copy
89
90
+ self.assertEqual(theme_white.selection_color, color_main)
91
+ self.assertEqual(sub_theme_white.selection_color, color_copy)
92
93
def test_methods(self) -> None:
94
"""
95
Test theme method.
0 commit comments