Skip to content

Commit c03ceb5

Browse files
test: add golden-byte test for PART marker encoding
The DONE marker (0xFFFFFFFFFFFFFFFF) had golden coverage but the PART marker (0xEEEEEEEEEEEEEEEE) did not. A symmetric bug in the PART marker constant would have gone undetected by the golden test suite. Closes #145 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9782efb commit c03ceb5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/test_golden_bytes.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,21 @@ def test_rows_response_boolean_nibble(self) -> None:
237237
assert isinstance(msg, RowsResponse)
238238
assert msg.rows == [[True]]
239239

240+
def test_rows_response_part_marker(self) -> None:
241+
"""145: PART marker must be 0xEEEEEEEEEEEEEEEE on the wire."""
242+
part_marker = _u64(0xEEEEEEEEEEEEEEEE)
243+
244+
msg = RowsResponse(
245+
column_names=["x"],
246+
column_types=[ValueType.INTEGER],
247+
row_types=[[ValueType.INTEGER]],
248+
rows=[[1]],
249+
has_more=True,
250+
)
251+
body = msg.encode_body()
252+
# Last 8 bytes should be the PART marker
253+
assert body[-8:] == part_marker
254+
240255

241256
class TestGoldenHandshake:
242257
"""Verify handshake encoding."""

0 commit comments

Comments
 (0)