[PR #1269] tests: check paths with non-ASCII characters in the child's own encoding (TEST-NON-ASCII-PATHS) #1300

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1269
Author: @TheGeogeo
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: test/non-ascii-paths


📝 Commits (1)

  • 1e9c868 tests: check paths with non-ASCII characters in the child's own encoding (TEST-NON-ASCII-PATHS)

📊 Changes

5 files changed (+21 additions, -12 deletions)

View changed files

📝 tests/test_build_runtime_fallback.py (+5 -2)
📝 tests/test_gamedata_blobs.py (+4 -2)
📝 tests/test_gamedata_sps1.py (+6 -4)
📝 tests/test_guest_scene_reference.py (+3 -2)
📝 tests/test_script_qtable.py (+3 -2)

📄 Description

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 -I writes the ANSI code page, so the path they assert is never found. test_build_runtime_fallback.py decodes 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 -I keeps, or [Console]::OutputEncoding in the PowerShell probe). The cases put \u00f8 in 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 main at 6261ca91 (1e9c868c; the ANSI and OEM code pages are 1252 and 850):

  • The five files pass: build_runtime_fallback 10, gamedata_blobs 8, gamedata_sps1 7, guest_scene_reference 6, script_qtable 10. Before this rebase (same patch), they also passed with TEMP set to a folder whose name has accents and spaces. On 66d4f5aa all five failed there and passed with an ASCII folder.
  • Negative control (before this rebase, same patch): with the encoding changes removed and the new paths kept, each of the five fails.
  • Merges with #714 and #876, which edit two of the files, are clean and the five files pass (before this rebase). Draft #320 conflicts with main on 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 --check and the no-game-data check passed (before this rebase).

GPUs tested: n/a (CPU-only synthetic tests).

AI-assisted: yes (Claude Code).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🔄 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/1269 **Author:** [@TheGeogeo](https://github.com/TheGeogeo) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/non-ascii-paths` --- ### 📝 Commits (1) - [`1e9c868`](https://github.com/ubiquitarianism/leonida/commit/1e9c868cb6aed0f43dd09621a035f66aab88cab3) tests: check paths with non-ASCII characters in the child's own encoding (TEST-NON-ASCII-PATHS) ### 📊 Changes **5 files changed** (+21 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_build_runtime_fallback.py` (+5 -2) 📝 `tests/test_gamedata_blobs.py` (+4 -2) 📝 `tests/test_gamedata_sps1.py` (+6 -4) 📝 `tests/test_guest_scene_reference.py` (+3 -2) 📝 `tests/test_script_qtable.py` (+3 -2) </details> ### 📄 Description 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 `-I` writes the ANSI code page, so the path they assert is never found. `test_build_runtime_fallback.py` decodes 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 `-I` keeps, or `[Console]::OutputEncoding` in the PowerShell probe). The cases put `\u00f8` in 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 `main` at `6261ca91` (`1e9c868c`; the ANSI and OEM code pages are 1252 and 850): - The five files pass: build_runtime_fallback 10, gamedata_blobs 8, gamedata_sps1 7, guest_scene_reference 6, script_qtable 10. Before this rebase (same patch), they also passed with `TEMP` set to a folder whose name has accents and spaces. On `66d4f5aa` all five failed there and passed with an ASCII folder. - Negative control (before this rebase, same patch): with the encoding changes removed and the new paths kept, each of the five fails. - Merges with #714 and #876, which edit two of the files, are clean and the five files pass (before this rebase). Draft #320 conflicts with `main` on 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 --check` and the no-game-data check passed (before this rebase). GPUs tested: n/a (CPU-only synthetic tests). AI-assisted: yes (Claude Code). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. --- <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#1300
No description provided.