Skip to content

tests: expect repr of unreadable paths in OSError messages (OLD-10046) - #2140

Closed
whoalin1 wants to merge 1 commit into
ProjectLeonida:mainfrom
whoalin1:carry-old-10046-unreadable-path
Closed

whoalin1 wants to merge 1 commit into
ProjectLeonida:mainfrom
whoalin1:carry-old-10046-unreadable-path

Conversation

@whoalin1

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: OLD-10046 (#1608 (comment))

What and why

Carries forward old-pr/10046 (draft #312, original commit author icecreammule277-dot preserved; indexed in #17), rebased cleanly onto current main (5fab93967).

The unreadable-folder tests assert that the blocked path appears in the tool's error. str(OSError) formats its filename with repr(), so on Windows every backslash in the path is doubled and assertIn(blocked, message) fails even though the tool printed the right path. The assertions now look for repr(blocked), the exact text str(OSError) embeds; on POSIX this is the same path text.

Only test expectations change; no tool behavior changes.

Tested

On Windows 11, Python 3.14, with the machine coordination lock held:

  • python -m compileall -q tests/test_bink_names.py tests/test_opus_tags.py tests/test_world_names.py — pass.
  • python -I tests/test_bink_names.py — 36 tests, OK.
  • python -I tests/test_opus_tags.py — 28 tests, OK.
  • python -I tests/test_world_names.py — 31 tests, OK.

No GPU, Vulkan SDK, or game data used. AI-assisted with Devin.

…pus_tags, world_names)

Each test makes the tree walk report an unreadable folder and asserts the
folder's path appears in the tool's error message. The message embeds
str(OSError), which prints the filename with repr(), so on Windows every
backslash is doubled and assertIn(path, message) misses. Expect repr(path),
which is the text OSError produces; on POSIX the two are identical.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@whoalin1

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #1425, which was opened first and changes the same three Windows PermissionError assertions in the same way. Sorry for the noise; I missed it in the carry-over scan. AI-assisted (Devin).

@whoalin1 whoalin1 closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants