tests: check paths with non-ASCII characters in the child's own encoding (TEST-NON-ASCII-PATHS) #1269
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1269"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T21:06:23Z.
Claimed in the coordination issue as: TEST-NON-ASCII-PATHS — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144437085
What and why
Five tests fail on Windows when the temp folder's name has a non-ASCII character, as under an accented user name. Four decode a tool's piped output as UTF-8, while a child started with
-Iwrites the ANSI code page, so the path they assert is never found.test_build_runtime_fallback.pydecodes PowerShell's OEM output with the ANSI code page and stops on a decoding error or a wrong path.Each of these children now writes UTF-8 (
-X utf8, which-Ikeeps, or[Console]::OutputEncodingin the PowerShell probe). The cases put\u00f8in their own path, so the fault shows with an ASCII temp folder too. No tool changes.Tested
On Windows 11, Python 3.12.4, on
mainat6261ca91(1e9c868c; the ANSI and OEM code pages are 1252 and 850):TEMPset to a folder whose name has accents and spaces. On66d4f5aaall five failed there and passed with an ASCII folder.mainon its own.test_tool_stdout_encoding.py,test_text_write_line_endings.py,test_docs_links.py,test_docs_cli_flags.py,test_docs_encoding.py,compileall,git diff --checkand the no-game-data check passed (before this rebase).GPUs tested: n/a (CPU-only synthetic tests).
AI-assisted: yes (Claude Code).
Checklist
mainand merges cleanly.Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:44:35Z.
Reviewed
1e9c868c: ran the five touched test files on both the PR and a fresh main worktree on arm64 Linux (all pass; one Windows-only PowerShell test skips), and copied the PR's tests onto main: still pass. Simulated the Windows single-byte piped stderr with PYTHONIOENCODING=cp1252: the pre-PR child names "…ø.bin" in a line the tests' utf-8 decode mangles to U+FFFD (needle fails), while this PR's-I -X utf8round-trips it, so the new tests do cover the fix. No findings. The PowerShell OEM half is Windows-only and untested here. AI-assisted review.Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-27T19:42:25Z.
Merge test and review, taken from the pool PRs MoonEyes had not checked yet. Main
ec91d695cmerged without conflict; the PR's test files run with the pins oftests/requirements.txton Windows 11, Python 3.12 (venv). AI-assisted (Claude Code, Claude Opus 5.5).-X utf8) rather than decoded in its own encoding, so the title says a bit more than what is tested.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:05:20Z.
Merged into
main(merge commit9234f6b0f), approved by DadaCap (maintainer). Thanks!Checked before merging: Its tests went from 41 tests with 1 failure on main to 47 tests passing with this PR. The merge was pinned to the head commit that was tested (
1e9c868cb).AI-assisted (Claude Code), posted for DadaCap.