MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / test_size

Method test_size

tests/test_request_cache.py:173–181  ·  view source on GitHub ↗

size returns number of cached entries

(self, cache: RequestCache)

Source from the content-addressed store, hash-verified

171 assert len(cache._pending_results) == 0
172
173 def test_size(self, cache: RequestCache) -> None:
174 """size returns number of cached entries"""
175 assert cache.size == 0
176
177 cache._cache["req-1"] = CacheEntry(response={"success": True})
178 assert cache.size == 1
179
180 cache._cache["req-2"] = CacheEntry(response={"success": True})
181 assert cache.size == 2
182
183 def test_pending_count(self, cache: RequestCache) -> None:
184 """pending_count returns number of in-flight requests"""

Callers

nothing calls this directly

Calls 1

CacheEntryClass · 0.90

Tested by

no test coverage detected