MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / row_view

Function row_view

tests/test_profile_map_v2.py:99–109  ·  view source on GitHub ↗

Small assertion-side splitter for the already-expected four-field wire.

(wire)

Source from the content-addressed store, hash-verified

97
98
99def row_view(wire):
100 """Small assertion-side splitter for the already-expected four-field wire."""
101 if wire and (not wire.endswith(b"\n") or b"\r" in wire or b"\0" in wire):
102 raise AssertionError("producer test wire has unsupported record delimiters")
103 rows = {}
104 for line in wire.split(b"\n")[:-1]:
105 key, state, reason, ids = line.split(b"\t")
106 if key in rows:
107 raise AssertionError("producer duplicated an expected row")
108 rows[key] = (state, reason, ids)
109 return rows
110
111
112class CountCancel:

Calls

no outgoing calls

Tested by

no test coverage detected