Skip to content

Commit 53689dc

Browse files
style: fix ruff failures in parity oracle tests
1 parent bf32bad commit 53689dc

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

tests/test_dual_path_parity_oracle.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from __future__ import annotations
2121

2222
import json
23-
import os
2423
import sys
2524
from pathlib import Path
2625

@@ -239,7 +238,8 @@ def test_nul_bytes_in_line_dropped_valid_lines_recovered(tmp_path: Path) -> None
239238
Oracle: exactly 1 message is recovered and its ``text`` equals the string
240239
from the valid line. Not a silent empty (which would be 0 messages).
241240
"""
242-
nul_line = b'\x00{"type":"user","uuid":"bad","message":{"content":[{"type":"text","text":"gone"}]}}\x00'
241+
bad_user = b'{"type":"user","uuid":"bad","message":{"content":[{"type":"text","text":"gone"}]}}'
242+
nul_line = b"\x00" + bad_user + b"\x00"
243243
valid_line = _user_entry("u-recovered", text="recovered-after-nul")
244244

245245
path = tmp_path / "nuls.jsonl"
@@ -320,6 +320,4 @@ def test_tool_result_with_no_matching_tool_use_yields_specific_result_type(
320320
"stdout must be preserved even without a matching tool_use"
321321
)
322322
# slug stored on the message (not on tool_result_parsed)
323-
assert msg.get("slug") == "orphaned-slug", (
324-
"slug must be stored verbatim on the user message"
325-
)
323+
assert msg.get("slug") == "orphaned-slug", "slug must be stored verbatim on the user message"

0 commit comments

Comments
 (0)