tests: expect the absolute path when the file is on another drive #90
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!90
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/90/head"
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?
@wavehs on GitHub · 2026-11-24 02:15 UTC · original
wavehs:tests-win-check-no-game-data-drive→main· +7 −1 · 1 files · 1 commits · merged 2026-11-24 03:10 UTCClaimed 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 it. No open pull request touches this file.
Depends on: none.
What and why
tests/test_check_no_game_data.pyis one of the Windowscheckjob's errors:The script itself handles this:
display()(scripts/check_no_game_data.py:281) reports the path relative to the working directory and keeps the absolute path whenos.path.relpathraises — which is what happens when a Windows temp file is onC:and the checkout is onD:. The test did not have that fallback and errored before comparing anything. It now expects the same path the tool prints.Tested
macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:
tests/test_check_no_game_data.pymain@9ec34cdffOK(POSIX: relpath never crosses a drive)OKThe Windows behaviour of the two path functions is checked with
ntpathdirectly:ntpath.relpath("C:\Temp\sibling.bin", "D:\a\leonida")raisesValueError: path is on mount 'C:', start on mount 'D:', which is the message in the CI log, and the fallback then keeps the absolute path — the line the script prints. Not run on Windows itself.compileallclean,check_no_game_data.pyclean.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: test-only.)display() reports a path relative to the working directory, but keeps the absolute path when os.path.relpath raises ValueError - a Windows temp file on C: with the checkout on D:. The test called relpath itself and errored out ('path is on mount C:, start on mount D:') instead of comparing the line the tool had printed correctly.@wavehs on GitHub · 2026-11-24 02:29 UTC · original
Rebased onto
main@e09a55529; the diff is unchanged andtests/test_check_no_game_data.pyis still OK here.