MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_persistence_across_instances

Function test_persistence_across_instances

tests/test_state.py:29–36  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

27
28
29def test_persistence_across_instances(tmp_path):
30 path = tmp_path / "hashes.json"
31 r1 = HashRegistry(path)
32 r1.add("hash1", {"file": "a.pdf"})
33
34 r2 = HashRegistry(path)
35 assert r2.is_known("hash1") is True
36 assert r2.get("hash1") == {"file": "a.pdf"}
37
38
39def test_all_entries_returns_all(tmp_path):

Callers

nothing calls this directly

Calls 4

addMethod · 0.95
is_knownMethod · 0.95
getMethod · 0.95
HashRegistryClass · 0.90

Tested by

no test coverage detected