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

Method test_get_stats

tests/chat/state/test_cache.py:98–105  ·  view source on GitHub ↗

Test get_stats returns correct info.

(self, cache)

Source from the content-addressed store, hash-verified

96 assert cache.get("tool4", {"x": 4}) is not None
97
98 def test_get_stats(self, cache):
99 """Test get_stats returns correct info."""
100 cache.put("sqrt", {"x": 18}, 4.2426)
101 cache.store_variable("sigma", 5.5)
102
103 stats = cache.get_stats()
104 assert stats.total_cached == 1
105 assert stats.total_variables == 1
106
107 def test_format_duplicate_message(self, cache):
108 """Test format_duplicate_message."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected