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

Closed
github-bot wants to merge 1 commit from gh-pr/2140/head into gh-pr/2140/base
Owner

@⁠whoalin1 on GitHub · 2026-11-25 22:52 UTC · original
whoalin1:carry-old-10046-unreadable-path → main · +6 −3 · 3 files · 1 commits · closed without merging

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

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.

**@⁠whoalin1** on GitHub · 2026-11-25 22:52 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2140) `whoalin1:carry-old-10046-unreadable-path` → `main` · +6 −3 · 3 files · 1 commits · closed without merging Claimed in the coordination issue as: OLD-10046 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### 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.
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 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:19:47 +00:00
github-bot closed this pull request 2026-11-26 10:19:47 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-26 04:22 UTC · original

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** on GitHub · 2026-11-26 04:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2140#issuecomment-7182536722) 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).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.