mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #312] [CLOSED] tests: expect the unreadable path as OSError prints it (bink_names, opus_tags, world_names) #364
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#364
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/312
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/10046📝 Commits (1)
e29f8f0tests: expect the unreadable path as OSError prints it (bink_names, opus_tags, world_names)📊 Changes
3 files changed (+6 additions, -3 deletions)
View changed files
📝
tests/test_bink_names.py(+2 -1)📝
tests/test_opus_tags.py(+2 -1)📝
tests/test_world_names.py(+2 -1)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7117092144 (test fix, no ID assigned)
Depends on: none.
What and why
tests/test_bink_names.py,tests/test_opus_tags.pyandtests/test_world_names.pyeach make the tree walk report an unreadable folder (onerror(PermissionError(13, ..., blocked))) and assert that the folder's path appears in the tool's error message. That message embedsstr(OSError), andOSError.__str__prints the filename withrepr(). On Windows a path has backslashes, so the message holds'C:\\Users\\...'andassertIn(blocked, message)misses it. All three fail onmainwith the same shape, e.g. "'C:\Users\...\blocked' not found in "opus_tags: error: [Errno 13] Permission denied: 'C:\\Users\\...\\blocked'"".Each assertion now expects
repr(blocked), which is exactly the textOSErrorproduces. On POSIX paths hold no backslashes or quotes, sorepr(blocked)is just the quoted path and the check is as strict as before. Test only; no tool change.Tested
Windows 11 (10.0.26300), CPython 3.15.2, no GPU or game files, on
mainde4c37383:maintests/test_bink_names.pytests/test_opus_tags.pytests/test_world_names.pyI did not run a POSIX interpreter; the POSIX equivalence above is by reading
OSError.__str__, not by a run.AI-assisted: yes (Claude Code, Claude Sonnet 5.5).
Checklist
docs/design.md, with how it was confirmed. (n/a: test only)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.