Skip to content

test: read subprocess output as UTF-8 so the suite passes on cp949 consoles - #8

Merged
bhyi4 merged 1 commit into
mainfrom
claude/tests-utf8
Nov 24, 2026
Merged

bhyi4 merged 1 commit into
mainfrom
claude/tests-utf8

Conversation

@bhyi4

@bhyi4 bhyi4 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Requested by 범후연이 · project thread

Problem

On Korean Windows (cp949), 7 tests failed on main. The CLI prints emoji, and the test decoded the child's output with the console codepage. The reader thread died on byte 0xf0 and the test received stdout=None. The CLI itself was fine.

Change

Test-only; no package code changed.

  • encoding="utf-8" replaces text=True in the test subprocess calls.
  • The new tests/conftest.py sets PYTHONIOENCODING=utf-8 (setdefault) for child processes.
  • The cp1252 console tests still set their own encoding. Their default read now uses the declared console encoding instead of the locale.

Verification

  • Windows 11, cp949 shell (PYTHONUTF8 and PYTHONIOENCODING unset): 88 passed. On main this setup had 7 failures.
  • Linux: 88 passed.

Generated by Claude Code

…nsoles

On Korean Windows (cp949) 7 tests failed: the CLI printed emoji and the test's
reader thread, decoding with the console codepage, died and returned
stdout=None. Tests now read children as UTF-8 and conftest.py asks children
for UTF-8 output; tests that pin a console encoding still set their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aq8kkjKAMDjSSK54hcWnuc
@bhyi4 bhyi4 self-assigned this Nov 24, 2026
@bhyi4
bhyi4 merged commit 9c349fa into main Nov 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants