mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #2175] test_mod_pack_output_alias: key the fake samefile on realpath, as report_paths does; passes on macOS (TEST-MOD-PACK-ALIAS-REALPATH) #2179
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#2179
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/2175
Author: @Tauwni
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/mod-pack-alias-test-realpath📝 Commits (2)
904dfe2test_mod_pack_output_alias: the fake samefile keys on realpath'd names, as report_paths does011fbd3Merge main into fix/mod-pack-alias-test-realpath📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
tests/test_mod_pack_output_alias.py(+6 -2)📄 Description
Claimed in the coordination issue as: TEST-MOD-PACK-ALIAS-REALPATH (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7180409400)
What and why
tests/test_mod_pack_output_alias.pyfails on macOS onmain:The test patches
report_paths.os.path.samefilewith a fake that answers true for the two paths it built. Butreport_paths.same_report_pathpassessamefiletheos.path.realpathof each path. On macOS,tempfile's folder/var/folders/...resolves to/private/var/folders/..., so the fake never matches and the alias check never fires. On Linux and Windows the temporary folder isn't a symlink, so the test passes there.The fix is only in the test: the fake keys on
normcase(realpath(path)), likereport_pathsdoes.tools/is unchanged.Tested
Apple M3, macOS 26.5.1, Python 3.15, on
mainad41fd517:TMPDIRset to a folder that isn't a symlink, the old test passes, which confirms the cause.TMPDIR.pack_moddisabled, the fixed test fails (4 failures), so it still catches the bug it was written for.tests/test_report_paths.pyOK.AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.