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

Method test_set_invalid_theme

tests/utils/test_preferences.py:159–166  ·  view source on GitHub ↗

Test setting invalid theme raises error.

(self)

Source from the content-addressed store, hash-verified

157 assert new_manager.get_theme() == "monokai"
158
159 def test_set_invalid_theme(self):
160 """Test setting invalid theme raises error."""
161 with tempfile.TemporaryDirectory() as tmpdir:
162 config_dir = Path(tmpdir) / ".mcp-cli"
163 manager = PreferenceManager(config_dir=config_dir)
164
165 with pytest.raises(ValueError, match="Invalid theme"):
166 manager.set_theme("invalid_theme")
167
168 def test_get_and_set_provider(self):
169 """Test getting and setting default provider."""

Callers

nothing calls this directly

Calls 2

set_themeMethod · 0.95
PreferenceManagerClass · 0.90

Tested by

no test coverage detected