mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:55:52 +01:00
[PR #21] [MERGED] tests: the sgpr census folding-volume case mocks the helpers same_report_path calls #76
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#76
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/21
Author: @wavehs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:test-user-sgpr-folding-volume-mocks📝 Commits (1)
9ebd8cftests: the sgpr census folding-volume case mocks the helpers same_report_path calls📊 Changes
1 file changed (+4 additions, -2 deletions)
View changed files
📝
tests/test_user_sgpr_census.py(+4 -2)📄 Description
Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. No open pull request touches
tests/test_user_sgpr_census.py.Depends on: none.
What and why
#6268("report_paths: resolve each path once in same_report_path") madesame_report_pathresolve both paths itself and call_resolved_key/_same_resolved_namedirectly, so thatpath_keyandsame_name_on_folding_volumeare no longer on its way to the volume probe. It updatedtests/test_report_paths.pyto patch the private helpers, andtests/test_psin_names.pywas updated with the same idiom, buttests/test_user_sgpr_census.pystill patched the two public names.On a case-insensitive volume the case still passed by accident, because the real key comparison folds
INDEX.JSONontoindex.json. On Linux the mocked probe is never called, the real key comparison and the real scratch-folder probe both say "different", and the tool writes the report:(from the
translator-testsjob onmain; the other two aretest_cf_diff, fixed by #7)The folding-volume case now patches
_resolved_keyand_same_resolved_name, astest_report_paths.py:175does; the rest of the parametrisation and the assertions are unchanged. Test file only;tools/report_paths.pyis not touched. The product check is right — a real vfat/CIFS mount is caught by the existing scratch-folder probe.Tested
main@9ec34cdff, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files. This host's APFS volume folds case, so the Linux key rules are emulated by settingreport_paths.case_insensitive_volume = lambda p: Falsebefore the module is imported by the test run:main@9ec34cdff, Linux rules emulatedtest_json_report_refuses_to_overwrite_index1 failed, 3 passed—Failed: DID NOT RAISE SystemExitin[folding-volume-case]4 passedOn the unmodified macOS rules both trees pass, which is why this stayed invisible here.
tests/test_user_sgpr_census.py,tests/test_psin_names.pyandtests/test_report_paths.pytogether: 83 passed, 37 subtests passed.compileallclean,check_no_game_data.pyclean.Not run: Windows, real Linux, any GPU test, the translator suite.
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.