The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(file_operations): pin early surrogate rejection over the backstop (#79178)
Theophilus Chinomona73cbc5e731c9
diff --git a/tests/tools/test_file_write_surrogate_roundtrip.py b/tests/tools/test_file_write_surrogate_roundtrip.pyindex 03d6e014b3a..d9043074329 100644--- a/tests/tools/test_file_write_surrogate_roundtrip.py+++ b/tests/tools/test_file_write_surrogate_roundtrip.py@@ -119,6 +119,10 @@ class TestWriteFileSurrogates:assert res.error and "surrogate" in res.errorassert "NOT created or modified" in res.errorassert "timed out" not in res.error+ # Pins the EARLY rejection (char repr in the message) rather than the+ # post-BOM backstop (whose message contains the codec traceback) —+ # the early rejection is what guarantees no child ever spawns.+ assert "codec can't encode" not in res.errorassert not p.exists()def test_rejected_write_leaves_existing_target_unchanged(self, ops, tmp_path):