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

Function _assert_one_line

tests/test_compact_graph_json.py:28–33  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

26
27
28def _assert_one_line(path: Path):
29 text = path.read_text(encoding="utf-8")
30 assert len(text.splitlines()) == 1, f"{path.name} spans {len(text.splitlines())} lines"
31 # compact separators: no space after ',' or ':' outside string values
32 assert '": ' not in text and '", ' not in text and "}, " not in text
33 return json.loads(text)
34
35
36def _node(nid: str, source_file: str = "a.py") -> dict:

Calls

no outgoing calls

Tested by

no test coverage detected