MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / test_persistence_roundtrip

Function test_persistence_roundtrip

tests/knowledge/test_graph.py:24–31  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

22
23
24def test_persistence_roundtrip(tmp_path):
25 p = tmp_path / "graph.json"
26 g = KnowledgeGraph()
27 g.record_from_text("module main.ts has `Foo`", now=2.0)
28 g.save(p)
29 g2 = KnowledgeGraph.load(p)
30 assert g2.stats()["total"] == g.stats()["total"]
31 assert any(e.name == "main.ts" for e in g2.entities.values())
32
33
34def test_clear():

Callers

nothing calls this directly

Calls 5

record_from_textMethod · 0.95
saveMethod · 0.95
statsMethod · 0.95
KnowledgeGraphClass · 0.90
loadMethod · 0.45

Tested by

no test coverage detected