Skip to content

fix(tests): read changelog as UTF-8 - #1236

Open
rioyu123 wants to merge 1 commit into
anthropics:mainfrom
rioyu123:codex/fix-changelog-utf8-tests
Open

fix(tests): read changelog as UTF-8#1236
rioyu123 wants to merge 1 commit into
anthropics:mainfrom
rioyu123:codex/fix-changelog-utf8-tests

Conversation

@rioyu123

Copy link
Copy Markdown

Summary

Read CHANGELOG.md explicitly as UTF-8 in its test module.

The changelog now contains Unicode punctuation, but the tests used
Path.read_text() without an encoding. On Windows hosts whose locale encoding
is CP936/GBK, all five content-based changelog tests fail with
UnicodeDecodeError before reaching their assertions. UTF-8 is the repository
file encoding and is already used explicitly by other readers in the SDK.

This keeps the change limited to the five affected reads; test behavior is
otherwise unchanged.

Testing

  • Before: 5 failed, 1542 passed, 12 skipped on Windows CP936
  • After: 1547 passed, 12 skipped
  • uv run ruff check tests/test_changelog.py
  • uv run ruff format --check tests/test_changelog.py

Prepared with AI assistance and reviewed against the reported Windows failure;
the full test suite and focused lint/format checks were run locally.

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.

1 participant