mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:00:52 +01:00
[PR #69] [CLOSED] tests: match the path as the error message prints it on Windows #122
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#122
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/69
Author: @wavehs
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:tests-win-error-path-repr📝 Commits (1)
54a2abdtests: match the path as the error message prints it on Windows📊 Changes
3 files changed (+9 additions, -3 deletions)
View changed files
📝
tests/test_bink_names.py(+3 -1)📝
tests/test_opus_tags.py(+3 -1)📝
tests/test_world_names.py(+3 -1)📄 Description
Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository's issue index (#18) has no entry for these. No open pull request touches these three files.
Depends on: none.
What and why
The Windows
checkjob collects every failing file, and three of them fail for one reason:OSError.__str__prints the filename with%r, so on Windows each backslash in the message is doubled.The same assertion in
tests/test_world_names.py:49andtests/test_opus_tags.py:337fails the same way. On POSIX there is nothing to escape, which is why these only fail on Windows. The tests now comparerepr(blocked), which is exactly what the tool prints — the product's message is Python's own and is right.Tested
macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2; no game files.
OKhere, before and after (the escaping only happens on Windows).PermissionErrorfrom a Windows path:blocked in message→False,repr(blocked) in message→True.checkjob log quoted above (9ec34cdff, run 45306800350, job 138157329747) — I have no Windows host to re-run it on.compileallclean,check_no_game_data.pyclean. Not run: Windows, any GPU test.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: test-only.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.