mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1412] tests: the mod-pack alias test compares resolved names, as same_report_path does (TEST-MOD-PACK-ALIAS-MACOS) #1441
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#1441
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/1412
Author: @milk4sale
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:test/mod-pack-alias-resolved-names📝 Commits (1)
09970b7tests: the mod-pack alias test compares resolved names, as same_report_path does (TEST-MOD-PACK-ALIAS-MACOS)📊 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-MACOS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147669112)
What and why
tests/test_mod_pack_output_alias.py, added by #1057 (onmainsincebe195981e), fails on macOS and on Windows.test_alias_preflight_precedes_output_truncationends inAssertionError: ModsError not raisedfor both of its cases. It passes on Linux.On macOS this is worse than one red file: the
macos-pythonjob stops at the first failing file, so every test file after this one goes unrun there. On Windows thecheckjob is cancelled at its time limit before it lists failed files (#1404), so nobody saw it there either.The fault is in the test, not in the tool. The test replaces
os.path.samefilewith a function that compares the two paths astempfilespelled them.report_paths.same_report_pathhandssamefilethe namesos.path.realpathgave it, and those are spelled differently where the temporary folder is reached through a link or a short name:tempfile.gettempdir()os.path.realpathof it/var/folders/…/T/private/var/folders/…/TC:\Users\RUNNER~1\AppData\Local\TempC:\Users\runneradmin\AppData\Local\Temp/tmp/tmpSo the stand-in never recognises the pair, and
pack_modgoes on to write the package. The stand-in now compares resolved names.tools/leonida_mods.pyandtools/report_paths.pyare right and unchanged; the claim's title says macOS because that is where I first saw it.Tested
Measured with Python 3.12 on GitHub's runners, from a scratch branch on my fork whose workflow ran only this (run 45511999132):
python -I tests/test_mod_pack_output_alias.pymacos-26windows-latestubuntu-24.04mainThe two failures are
ModsError not raisedforrelative='mod.json'andrelative='nested/notes.txt', the same as in themacos-pythonjob of a run ofmain3a0af1f15(run 45510568820).Locally, on Linux with Python 3.14.10:
python -I tests/test_mod_pack_output_alias.py: 3 tests pass, before and after.TMPDIRpointing through a symbolic link,main's file fails with the same two failures and this one passes.python -I scripts/check_no_game_data.py tests/test_mod_pack_output_alias.pyandgit diff --check.GPUs tested: n/a (one Python test file)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.