tests: first_look paths use the long temp name when it is not ASCII (TEST-FIRST-LOOK-NON-ASCII) #2092
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2092
Loading…
Reference in a new issue
No description provided.
Delete branch "test/first-look-non-ascii"
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 successfully merged and closed
Claimed in the coordination issue as: TEST-FIRST-LOOK-NON-ASCII (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7173090712)
What and why
tests/test_first_look_paths.pyfails on native Windows when the user name is not ASCII.tempfilereturns the 8.3 alias of the profile folder (C:\Users\OUZ~1\...for a user named Oğuz), and Windows PowerShell 5.1 refuses toSet-Location -LiteralPathinto the short alias of a folder whose long name is not ASCII:On the same machine
Set-Location -LiteralPath C:\PROGRA~1works, andTest-Path -LiteralPath C:\Users\OUZ~1returnsTrue. Only the non-ASCII short alias fails, so the location never changes andfirst_look.ps1cannot find the relativefixture[1].exe.The fix is test-only. When the long name of the temporary folder is not ASCII, the test uses that long name. An ASCII short alias, such as CI's
RUNNER~1, is kept, so the check that the dry run gets the canonical (resolve()d) path is still exercised there. Nothing changes on hosts whose temporary folder is already ASCII.Tested
Windows 10 Pro 19045, Windows PowerShell 5.1, CPython 3.12, user profile
C:\Users\Oğuz(TEMP =C:\Users\OUZ~1\AppData\Local\Temp):py -3.12 -I tests/test_first_look_paths.py:FAILED (failures=1)onmain,OKwith this change.GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
tests/test_first_look_paths.py: 1 passed.(AI-assisted test run; output checked by hand.)
Red/green: No red test; this tests-only PR's tests/test_first_look_paths.py passes on main and with the PR natively on Windows (skipped on GitHub Actions Linux).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)
Verified by OreoFR
4a54aedcb+ PR headd838d7fe9python -I tests/test_first_look_paths.pyAI-assisted (Claude Code, Claude Opus 5.5).