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

Function test_cache_miss_on_change

tests/test_cache.py:45–51  ·  view source on GitHub ↗

After file content changes, load_cached returns None.

(tmp_file, cache_root)

Source from the content-addressed store, hash-verified

43
44
45def test_cache_miss_on_change(tmp_file, cache_root):
46 """After file content changes, load_cached returns None."""
47 result = {"nodes": [], "edges": [{"source": "a", "target": "b"}]}
48 save_cached(tmp_file, result, root=cache_root)
49 # Modify the file
50 tmp_file.write_text("completely different content")
51 assert load_cached(tmp_file, root=cache_root) is None
52
53
54def 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