[PR #880] [CLOSED] tests/semantic: standalone HERE sys.path boilerplate for 64 files (TEST-SEMANTIC-SYSPATH) #918

Closed
opened 2026-11-26 20:19:29 +01:00 by 4ld0 · 0 comments
Owner

📋 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)

  • 88da8f0 tests/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.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/880 **Author:** [@morodirule](https://github.com/morodirule) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/test-semantic-syspath` --- ### 📝 Commits (1) - [`88da8f0`](https://github.com/ubiquitarianism/leonida/commit/88da8f0f1255a7bdfc400b5093b3091bf071f462) tests/semantic: standalone HERE sys.path boilerplate for 64 files (TEST-SEMANTIC-SYSPATH) ### 📊 Changes **64 files changed** (+508 additions, -124 deletions) <details> <summary>View changed files</summary> 📝 `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_ </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:29 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#918
No description provided.