Skip to content

Tests: read checked-in sources as UTF-8 in two new suites - #19055

Merged
danielhanchen merged 1 commit into
mainfrom
fix/test-reads-name-utf8
Nov 23, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/test-reads-name-utf8

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, rest-2) fails on main:

tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding
E   AssertionError: 1 file reads in the test trees touch a checked-in file with the platform default encoding, so they break on Windows as soon as that file gains a non-ASCII byte. Pass encoding = "utf-8": ['tests/test_inkling2_parallel.py:104: read_text()']
E   AssertionError: ... ['tests/test_rocm_skinny_linear.py:668: read_text()']

Root cause

The new tests, not the guard. Two recent suites read a checked-in source file with read_text() and no encoding, which on Windows decodes with the locale code page:

File Added by
tests/test_inkling2_parallel.py:104 (reads unsloth/models/loader.py) #18959
tests/test_rocm_skinny_linear.py:668 (reads unsloth/kernels/rocm_skinny_linear.py) #18874

Fix

Pass encoding = "utf-8" on both reads. Tests only.

Testing

  • tests/test_source_read_encoding.py, tests/test_inkling2_parallel.py, tests/test_rocm_skinny_linear.py: 60 passed, 51 skipped (GPU cases). The guard failed on main without this change.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T12:02:26.598151Z ccbaf79 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: ccbaf79591

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 2a30623 into main Nov 23, 2026
@danielhanchen
danielhanchen deleted the fix/test-reads-name-utf8 branch November 23, 2026 12:02
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