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

Function test_clear_cache

tests/test_cache.py:93–100  ·  view source on GitHub ↗

clear_cache removes all .json files from graphify-out/cache/ (all subdirs).

(tmp_file, cache_root)

Source from the content-addressed store, hash-verified

91
92
93def test_clear_cache(tmp_file, cache_root):
94 """clear_cache removes all .json files from graphify-out/cache/ (all subdirs)."""
95 save_cached(tmp_file, {"nodes": [], "edges": []}, root=cache_root)
96 # Since v0.5.3 entries go into cache/ast/, not the flat cache/ dir
97 cache_base = cache_root / "graphify-out" / "cache"
98 assert len(list(cache_base.rglob("*.json"))) > 0
99 clear_cache(cache_root)
100 assert len(list(cache_base.rglob("*.json"))) == 0
101
102
103def test_md_frontmatter_only_change_same_hash(tmp_path):

Callers

nothing calls this directly

Calls 2

save_cachedFunction · 0.90
clear_cacheFunction · 0.90

Tested by

no test coverage detected