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

Method test_duplicate_increments_count

tests/chat/state/test_cache.py:28–35  ·  view source on GitHub ↗

Test that duplicate calls increment count.

(self, cache)

Source from the content-addressed store, hash-verified

26 assert cached is None
27
28 def test_duplicate_increments_count(self, cache):
29 """Test that duplicate calls increment count."""
30 cache.put("sqrt", {"x": 18}, 4.2426)
31 cached1 = cache.get("sqrt", {"x": 18})
32 assert cached1.call_count == 2 # put + get
33
34 cached2 = cache.get("sqrt", {"x": 18})
35 assert cached2.call_count == 3
36
37 def test_duplicate_count_tracking(self, cache):
38 """Test duplicate count is tracked."""

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected