mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #368] [MERGED] tests: sgpr census folding-volume case survives Windows realpath case (TEST-WIN-SWEEP) #420
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#420
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/368
Author: @ItsMrDubey
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:win-realpath-case-census📝 Commits (1)
608a24atests: the sgpr census folding-volume case keeps the name's case through realpath on Windows📊 Changes
1 file changed (+7 additions, -3 deletions)
View changed files
📝
tests/test_user_sgpr_census.py(+7 -3)📄 Description
Claimed in the coordination issue as: TEST-WIN-SWEEP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121328982)
What and why
python -m pytest tests/test_user_sgpr_census.pyfails on Windows intest_json_report_refuses_to_overwrite_index[folding-volume-case]:Expected 'mock' to have been called once. Called 0 times.The case writesindex.jsonand passesINDEX.JSONas--jsonto simulate a case-folding volume, patching_resolved_keyandos.path.samefileso only the_same_resolved_nameprobe can catch the collision. On Windowsos.path.realpathreturns an existing file's name as it is stored, soINDEX.JSONresolves to...\index.json, the two keys already match and the probe is never asked. The tool did refuse the overwrite (exit 2), only by the other route; the test was wrong, not the code.The case now also patches
realpathwithos.path.abspath, astests/test_wave64_graphics_scan.pyandtests/test_psin_names.pyalready do for the same simulation, so the spelling reaches the probe on every OS.Tested
Windows 11, Python 3.11.9 and 3.12.9:
py -3.12 -m pytest tests/test_user_sgpr_census.py: before 1 failed, 43 passed; after 44 passed. Same with Python 3.11.9.python -I scripts/check_no_game_data.py tests/test_user_sgpr_census.py: clean.realpathnever changed the case there, andtmp_pathgives both names one parent, soabspathyields the same pair as before.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. n/a: no translator rule🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.