File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,6 +142,32 @@ def test_pt_theme_is_none() -> None:
142142 assert get_pt_theme () is not None
143143
144144
145+ def test_sync_all_theme_is_none () -> None :
146+ """Test that calling _sync_all() when _THEME is None is a no-op."""
147+ from cmd2 import theme
148+
149+ theme ._THEME = None
150+ theme ._PT_THEME = None
151+
152+ theme ._sync_all ()
153+
154+ assert theme ._THEME is None
155+ assert theme ._PT_THEME is None
156+
157+
158+ def test_sync_pt_theme_theme_is_none () -> None :
159+ """Test that calling _sync_pt_theme() when _THEME is None is a no-op."""
160+ from cmd2 import theme
161+
162+ theme ._THEME = None
163+ theme ._PT_THEME = None
164+
165+ theme ._sync_pt_theme ()
166+
167+ assert theme ._THEME is None
168+ assert theme ._PT_THEME is None
169+
170+
145171def test_register_pt_mapping () -> None :
146172 """Test style registration with UI mapping."""
147173 style_name = "my_custom_scrollbar"
You can’t perform that action at this time.
0 commit comments