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

Function test_cached_files

tests/test_cache.py:78–90  ·  view source on GitHub ↗

cached_files returns the set of cached hashes.

(tmp_path, cache_root)

Source from the content-addressed store, hash-verified

76
77
78def test_cached_files(tmp_path, cache_root):
79 """cached_files returns the set of cached hashes."""
80 f1 = tmp_path / "file1.py"
81 f2 = tmp_path / "file2.py"
82 f1.write_text("alpha")
83 f2.write_text("beta")
84
85 save_cached(f1, {"nodes": [], "edges": []}, root=cache_root)
86 save_cached(f2, {"nodes": [], "edges": []}, root=cache_root)
87
88 hashes = cached_files(cache_root)
89 assert file_hash(f1, cache_root) in hashes
90 assert file_hash(f2, cache_root) in hashes
91
92
93def test_clear_cache(tmp_file, cache_root):

Callers

nothing calls this directly

Calls 3

save_cachedFunction · 0.90
cached_filesFunction · 0.90
file_hashFunction · 0.90

Tested by

no test coverage detected