tests: first_look paths use the long temp name when it is not ASCII (TEST-FIRST-LOOK-NON-ASCII) #2092

Open
github-bot wants to merge 1 commit from github-bot/gh-2092 into main AGit
Owner

@⁠OguzSoykan on GitHub · 2026-11-25 20:02 UTC · original
OguzSoykan:test/first-look-non-ascii → main · +7 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEST-FIRST-LOOK-NON-ASCII (#1608)

What and why

tests/test_first_look_paths.py fails on native Windows when the user name is not ASCII. tempfile returns the 8.3 alias of the profile folder (C:\Users\OUZ~1\... for a user named Oğuz), and Windows PowerShell 5.1 refuses to Set-Location -LiteralPath into the short alias of a folder whose long name is not ASCII:

Set-Location : An object at the specified path C:\Users\OUZ~1 does not exist.
...
C:\Users\Oğuz\AppData\Local\Temp\tmp...\fixture[1].exe not found

On the same machine Set-Location -LiteralPath C:\PROGRA~1 works, and Test-Path -LiteralPath C:\Users\OUZ~1 returns True. Only the non-ASCII short alias fails, so the location never changes and first_look.ps1 cannot find the relative fixture[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) on main, OK with this change.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

**@⁠OguzSoykan** on GitHub · 2026-11-25 20:02 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2092) `OguzSoykan:test/first-look-non-ascii` → `main` · +7 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: TEST-FIRST-LOOK-NON-ASCII (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why `tests/test_first_look_paths.py` fails on native Windows when the user name is not ASCII. `tempfile` returns the 8.3 alias of the profile folder (`C:\Users\OUZ~1\...` for a user named Oğuz), and Windows PowerShell 5.1 refuses to `Set-Location -LiteralPath` into the short alias of a folder whose long name is not ASCII: ``` Set-Location : An object at the specified path C:\Users\OUZ~1 does not exist. ... C:\Users\Oğuz\AppData\Local\Temp\tmp...\fixture[1].exe not found ``` On the same machine `Set-Location -LiteralPath C:\PROGRA~1` works, and `Test-Path -LiteralPath C:\Users\OUZ~1` returns `True`. Only the non-ASCII short alias fails, so the location never changes and `first_look.ps1` cannot find the relative `fixture[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)` on `main`, `OK` with this change. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Windows PowerShell 5.1 refuses Set-Location into the 8.3 alias of a folder
whose long name is not ASCII (C:\Users\OUZ~1 for a user named Oguz), so
test_first_look_paths failed before first_look.ps1 ran. Use the long name
in that case; an ASCII alias such as CI's RUNNER~1 is kept, so the dry-run
canonical-path check is still exercised.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:17:30 +00:00
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-26 10:00 UTC · original · edited 2026-11-26 10:30 UTC

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.)

**@⁠DeadlyChirp** on GitHub · 2026-11-26 10:00 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2092#issuecomment-7188788811) · edited 2026-11-26 10:30 UTC 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.)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2092/head:github-bot/gh-2092'
git switch 'github-bot/gh-2092'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2092'
git switch 'github-bot/gh-2092'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2092'
git switch 'github-bot/gh-2092'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2092'
git switch 'main'
git merge --squash 'github-bot/gh-2092'
git switch 'main'
git merge --ff-only 'github-bot/gh-2092'
git switch 'main'
git merge 'github-bot/gh-2092'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.