mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #90] [MERGED] tests: expect the absolute path when the file is on another drive #140
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#140
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/90
Author: @wavehs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:tests-win-check-no-game-data-drive📝 Commits (1)
d411c98tests: expect the absolute path when the file is on another drive📊 Changes
1 file changed (+7 additions, -1 deletions)
View changed files
📝
tests/test_check_no_game_data.py(+7 -1)📄 Description
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.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.