mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:50:52 +01:00
[PR #1082] [CLOSED] tests/test_guest_scene_reference: decode the launch-failure output with errors=replace (TEST-GUEST-SCENE-LOCALE) #1116
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#1116
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/1082
Author: @syntaxixr
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:tests/guest-scene-locale📝 Commits (1)
ae55522tests/test_guest_scene_reference: decode the launch-failure output with errors=replace (TEST-GUEST-SCENE-LOCALE)📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
tests/test_guest_scene_reference.py(+3 -1)📄 Description
Claimed in the coordination issue as: TEST-GUEST-SCENE-LOCALE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140102942).
Problem
test_launch_failure_preserves_run_record_and_logsdecodesscripts/run_guest_scene.py's output as strict UTF-8. When the runner fails to launch, the error it prints includes the OS message, and on a non-English Windows that message is in the console's ANSI code page. On Russian Windows 10 (19045) the bytes are cp1251 ([WinError 216] \xdd\xf2\xe0 \xe2\xe5\xf0\xf1\xe8\xff "%1" ..., i.e.Эта версия "%1" ...), sosubprocess.runraisesUnicodeDecodeError: 'utf-8' codec can't decode byte 0xddin its reader thread before any assertion runs. CI runs on English Windows, which is why it doesn't show there.Fix
Decode with
errors="replace", as the test just above (line 95) already does. The assertions only read the return code and the JSON files the runner writes, so nothing they check changes.Tested
Windows 10 22H2 (19045), Russian locale, Python 3.12.5:
python -I tests/test_guest_scene_reference.py:maingivesFAILED (errors=1)(UnicodeDecodeError); this branch givesOK.Test only, no game files. AI-assisted.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.