mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #880] [CLOSED] tests/semantic: standalone HERE sys.path boilerplate for 64 files (TEST-SEMANTIC-SYSPATH) #918
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#918
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/880
Author: @morodirule
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:fix/test-semantic-syspath📝 Commits (1)
88da8f0tests/semantic: standalone HERE sys.path boilerplate for 64 files (TEST-SEMANTIC-SYSPATH)📊 Changes
64 files changed (+508 additions, -124 deletions)
View changed files
📝
tests/semantic/test_andn2_exec_b64.py(+9 -2)📝
tests/semantic/test_bary_fallback.py(+7 -3)📝
tests/semantic/test_bfi_known_mask.py(+8 -1)📝
tests/semantic/test_bfm_known_operands.py(+8 -1)📝
tests/semantic/test_buffer_formats_all.py(+7 -4)📝
tests/semantic/test_buffer_swizzle.py(+10 -3)📝
tests/semantic/test_cvt_pk_u8.py(+5 -1)📝
tests/semantic/test_ds_permute.py(+7 -2)📝
tests/semantic/test_exec_computed.py(+6 -2)📝
tests/semantic/test_export_valid_mask.py(+12 -5)📝
tests/semantic/test_f16_interp_fallback.py(+11 -4)📝
tests/semantic/test_f16_sum_narrowing.py(+8 -1)📝
tests/semantic/test_f32_valu.py(+8 -2)📝
tests/semantic/test_f64_round.py(+7 -1)📝
tests/semantic/test_far_branch.py(+6 -2)📝
tests/semantic/test_float_to_int.py(+8 -1)📝
tests/semantic/test_format_decode_table.py(+10 -3)📝
tests/semantic/test_fract_f16_infinity.py(+8 -1)📝
tests/semantic/test_image_bvh_box.py(+8 -1)📝
tests/semantic/test_image_bvh_box_hw.py(+8 -1)...and 44 more files
📄 Description
Claimed in the coordination issue as: TEST-SEMANTIC-SYSPATH
Carries abnalstlll-byte's finding (46 files, now 64 on current main): tests/semantic files importing support without the HERE insertion fail with ModuleNotFoundError when run directly by path.
Change: adds the standard guarded block
HERE = os.path.dirname(os.path.abspath(file))
if HERE not in sys.path:
sys.path.insert(0, HERE)
before the first same-dir import in 64 files, adding missing import os/sys and noqa E402 to match the other 400+ files. Five files with a misplaced bare HERE after the support import (far_branch, salu64/new_ops/int_ext/misc_ext fixtures) and buffer_formats_all now use the single guarded definition (ROOT/TOOLS_DIR derivations unchanged).
Tests: full translator suite via scripts/run_semantic_tests.py: 465 files, 6108 tests, 0 failed. Direct-by-path runs: 56 files print OK, 8 runner-less files import clean with exit 0; baseline of the same form fails with ModuleNotFoundError: No module named 'support' (checked via cd tests/semantic && python3 -I test_X.py). Hardware: Linux x86-64, no GPU needed. No game files, nothing online.
AI-assisted.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.