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

Function test_cache_miss_on_change

tests/test_cache.py:69–75  ·  view source on GitHub ↗

After file content changes, load_cached returns None.

(tmp_file, cache_root)

Source from the content-addressed store, hash-verified

67
68
69def test_cache_miss_on_change(tmp_file, cache_root):
70 """After file content changes, load_cached returns None."""
71 result = {"nodes": [], "edges": [{"source": "a", "target": "b"}]}
72 save_cached(tmp_file, result, root=cache_root)
73 # Modify the file
74 tmp_file.write_text("completely different content")
75 assert load_cached(tmp_file, root=cache_root) is None
76
77
78def test_cached_files(tmp_path, cache_root):

Callers

nothing calls this directly

Calls 2

save_cachedFunction · 0.90
load_cachedFunction · 0.90

Tested by

no test coverage detected