tests: expect the absolute path when the file is on another drive #90
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!90
Loading…
Reference in a new issue
No description provided.
Delete branch "tests-win-check-no-game-data-drive"
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 successfully merged and closed
Claimed 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.)Rebased onto
main@e09a55529; the diff is unchanged andtests/test_check_no_game_data.pyis still OK here.