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

Function test_file_hash_consistent

tests/test_cache.py:43–49  ·  view source on GitHub ↗

Same file gives same hash on repeated calls.

(tmp_file)

Source from the content-addressed store, hash-verified

41
42
43def test_file_hash_consistent(tmp_file):
44 """Same file gives same hash on repeated calls."""
45 h1 = file_hash(tmp_file)
46 h2 = file_hash(tmp_file)
47 assert h1 == h2
48 assert isinstance(h1, str)
49 assert len(h1) == 64 # SHA256 hex digest length
50
51
52def test_file_hash_changes(tmp_path):

Callers

nothing calls this directly

Calls 1

file_hashFunction · 0.90

Tested by

no test coverage detected