Repository navigation
tests: expect the unreadable path as OSError prints it (bink_names, opus_tags, world_names) (OLD-10046) - #763
Conversation
…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>
lixonik
left a comment
There was a problem hiding this comment.
Independent check from full Git worktrees at e04c4216 and 2d73c242. On Windows the base failed exactly the one unreadable-directory assertion in each of the three changed suites. The PR passed all 95 tests on Windows (36 Bink, 28 Opus, 31 world names). The same 95 also passed on Linux under local WSL, confirming the new repr assertions work on both platforms.
Commands used python -I -B on each of the three test files. AI-assisted testing with synthetic inputs. No game files or GPU used.
|
Measured conflict with #128 on native Windows 11, Python 3.13, clean worktrees (no game files, no GPU):
So the two approaches cannot both merge; whichever lands second turns the Windows leg red. Linux CI does not show it because Recommendation: close this and #312 in favour of #128, which fixes the tool's error message instead of baking the doubled-backslash form into the tests. If the maintainers prefer the test-side fix, #128 should be closed instead; either way one of them needs to go. AI-assisted. |
|
Closing in favour of #128. Thank you @nilparra-dev and @levi2m for the thorough cross-PR Windows measurements (and @lixonik for checking Windows/WSL). Fixing the tool-side error formatting in #128 ( |
Carries old PR 10046 (draft #312, old-pr/10046 by @icecreammule277-dot), rebased cleanly on current main (2d73c24).
What this does
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 exact text OSError produces on Windows while remaining identical on POSIX.
Verification