MCPcopy
hub / github.com/safishamsi/graphify / test_cache_roundtrip

Function test_cache_roundtrip

tests/test_cache.py:37–42  ·  view source on GitHub ↗

Save then load returns the same result dict.

(tmp_file, cache_root)

Source from the content-addressed store, hash-verified

35
36
37def test_cache_roundtrip(tmp_file, cache_root):
38 """Save then load returns the same result dict."""
39 result = {"nodes": [{"id": "n1", "label": "Node1"}], "edges": []}
40 save_cached(tmp_file, result, root=cache_root)
41 loaded = load_cached(tmp_file, root=cache_root)
42 assert loaded == result
43
44
45def test_cache_miss_on_change(tmp_file, cache_root):

Callers

nothing calls this directly

Calls 2

save_cachedFunction · 0.90
load_cachedFunction · 0.90

Tested by

no test coverage detected