mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1421] tests: test_mesh_alloc_single_writer inserts 'tools' by __file__, not cwd (TEST-MESHALLOC-SYSPATH) #1452
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#1452
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/1421
Author: @thiefyzheng
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/test-meshalloc-syspath📝 Commits (1)
80d1424tests: test_mesh_alloc_single_writer inserts 'tools' by file, not cwd (TEST-MESHALLOC-SYSPATH)📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
tests/test_mesh_alloc_single_writer.py(+2 -1)📄 Description
What
One line:
tests/test_mesh_alloc_single_writer.pyinserted'tools'onsys.pathrelative to the process working directory (sys.path.insert(0, 'tools'), the only relative insert intests/), soimport rdna2spirvon the next line worked only when the cwd was the repository root. It now derives the path from__file__, the same idiom the neighbouring test files use (e.g.tests/test_f32_fuzz.py,tests/test_psin_names.py).Claimed as TEST-MESHALLOC-SYSPATH on #14 (the finding is @GTAVIB4GTAVI's, at 23:47:17Z).
Why
python -I tests/test_mesh_alloc_single_writer.pyfrom the repo root passes, but the same command from any other cwd fails withModuleNotFoundError: No module named 'rdna2spirv'— and it is the oneImportErrorin arun_semantic_tests.py testsrun, because that runner starts each child withcwd=<suite folder>(scripts/run_semantic_tests.py:117).What I ran (Linux, CPython 3.12, no GPU, synthetic only)
364ab4eab: from the worktree root the file passes; from an unrelated cwd (/tmp, absolute path invocation) →ModuleNotFoundError: No module named 'rdna2spirv'(reproduced, quoted in the claim thread).Ran 1 test in 0.001s ... OK;python3 -m unittest tests.test_mesh_alloc_single_writer -valso passes.grepover tests/ and scripts/: no other file references this file's path behavior.scripts/check_no_game_data.pyexit 0.Not run
Not run on Windows (the change has no platform-specific behavior: both sides are pure
os.path); not run under CI — workflows will cover the file.AI-assisted: a pi coding agent operated by the repo contributor ran the verification and built the single-file diff; the finding is @GTAVIB4GTAVI's.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.