MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_theme_light

Method test_theme_light

tests/chat/test_ui_manager_coverage.py:118–145  ·  view source on GitHub ↗

Light theme uses white bg.

(self)

Source from the content-addressed store, hash-verified

116 assert ui_manager._last_interrupt_time == 0.0
117
118 def test_theme_light(self):
119 """Light theme uses white bg."""
120 ctx = _make_context()
121 with (
122 patch("mcp_cli.chat.ui_manager.get_preference_manager") as mock_pref,
123 patch("mcp_cli.chat.ui_manager.get_theme") as mock_theme,
124 patch(
125 "mcp_cli.chat.ui_manager.create_transparent_completion_style",
126 return_value={},
127 ),
128 patch("mcp_cli.chat.ui_manager.Style"),
129 patch("mcp_cli.chat.ui_manager.register_all_commands"),
130 patch("mcp_cli.chat.ui_manager.ChatCommandCompleter"),
131 patch("mcp_cli.chat.ui_manager.PromptSession"),
132 patch("mcp_cli.chat.ui_manager.FileHistory"),
133 patch("mcp_cli.chat.ui_manager.AutoSuggestFromHistory"),
134 patch("mcp_cli.chat.ui_manager.StreamingDisplayManager"),
135 ):
136 mock_pref.return_value.get_history_file.return_value = "/tmp/h"
137 theme = MagicMock()
138 theme.name = "light"
139 theme.colors = {}
140 mock_theme.return_value = theme
141
142 from mcp_cli.chat.ui_manager import ChatUIManager
143
144 ui = ChatUIManager(ctx)
145 assert ui is not None
146
147 def test_theme_minimal(self):
148 """Minimal theme uses empty bg."""

Callers

nothing calls this directly

Calls 2

ChatUIManagerClass · 0.90
_make_contextFunction · 0.70

Tested by

no test coverage detected