Skip to content

Commit 3e5fa68

Browse files
committed
Open the errlog capture as UTF-8 in the noisy-child test
Matches the sibling errlog tests; the platform locale default could mojibake a failing child's stderr diagnostics on Windows. No-Verification-Needed: test-only encoding fix
1 parent 45eed51 commit 3e5fa68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/transports/stdio/test_lifecycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def run_noisy_child() -> str:
303303
"""
304304
)
305305

306-
with (tmp_path / "server-stderr.txt").open("w+") as errlog:
306+
with (tmp_path / "server-stderr.txt").open("w+", encoding="utf-8") as errlog:
307307
transport = stdio_client(StdioServerParameters(command=sys.executable, args=["-c", server]), errlog=errlog)
308308
# Bound covers three interpreter cold starts; a regressed Windows leg hangs rather than corrupts.
309309
with anyio.fail_after(40):

0 commit comments

Comments
 (0)