mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:50:53 +01:00
[PR #2112] tests: decode the GPU work-directory error as UTF-8 on non-English Windows (TEST-WINDOWS-ANSI-STDERR) #2116
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2116
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2112
Author: @MoonEyes
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/run-gpu-tests-ansi-stderr📝 Commits (3)
3f41e58tests: decode the GPU work-directory error as UTF-8 on non-English Windowsa270e95Merge remote-tracking branch 'origin/main' into fix/run-gpu-tests-ansi-stderr92465a0Merge remote-tracking branch 'origin/main' into fix/run-gpu-tests-ansi-stderr📊 Changes
1 file changed (+4 additions, -2 deletions)
View changed files
📝
tests/test_run_gpu_tests_paths.py(+4 -2)📄 Description
Claimed in the coordination issue as: TEST-WINDOWS-ANSI-STDERR (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7174699096)
What and why
WorkDirectory.test_file_blocking_work_directory_is_a_cli_errorintests/test_run_gpu_tests_paths.pyrunsscripts/run_gpu_tests.pywith-Iand asserts on its stderr. That stderr quotes a localized OS error("Impossible de créer un fichier déjà existant" on a French install).
-IignoresPYTHONUTF8, so the childwrote the message in the ANSI code page (cp1252), while a parent running with
PYTHONUTF8=1decoded the pipeas UTF-8. The reader thread raised
UnicodeDecodeError,result.stderrcame backNone, and both subtests(
blocked_child=''and'spirv') failed with aTypeErrorbefore their assertions ran.The child now runs with
-X utf8(which-Ikeeps) and the parent decodes withencoding="utf-8", so both sidesagree whatever the host locale or
PYTHONUTF8setting. Decoding stays strict, so a real mismatch would still show.Test-only change;
scripts/run_gpu_tests.pyis untouched.Tested
Windows 11 (French, ANSI code page cp1252), Python 3.14.0,
python -m pytest tests/test_run_gpu_tests_paths.py:PYTHONUTF8=1: 2 subtests fail (UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9, thenTypeError: argument of type 'NoneType' is not a container or iterableat line 145).PYTHONUTF8: passes.PYTHONUTF8=1: 21 passed, 7 subtests passed.PYTHONUTF8: 21 passed, 7 subtests passed.GPUs tested: n/a (the test uses stand-in tool files; no GPU runs)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.