MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / test_cache_roundtrip

Function test_cache_roundtrip

tests/test_cache.py:61–66  ·  view source on GitHub ↗

Save then load returns the same result dict.

(tmp_file, cache_root)

Source from the content-addressed store, hash-verified

59
60
61def test_cache_roundtrip(tmp_file, cache_root):
62 """Save then load returns the same result dict."""
63 result = {"nodes": [{"id": "n1", "label": "Node1"}], "edges": []}
64 save_cached(tmp_file, result, root=cache_root)
65 loaded = load_cached(tmp_file, root=cache_root)
66 assert loaded == result
67
68
69def 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