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

Open
opened 2026-11-26 21:20:01 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2092
Author: @OguzSoykan
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: test/first-look-non-ascii


📝 Commits (1)

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

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 tests/test_first_look_paths.py (+7 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2092 **Author:** [@OguzSoykan](https://github.com/OguzSoykan) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/first-look-non-ascii` --- ### 📝 Commits (1) - [`d838d7f`](https://github.com/ubiquitarianism/leonida/commit/d838d7fe9782aedf10b6bc1a124bbea9c532c1b4) tests: first_look paths use the long temp name when it is not ASCII (TEST-FIRST-LOOK-NON-ASCII) ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_first_look_paths.py` (+7 -0) </details> ### 📄 Description 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.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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2097
No description provided.