[PR #474] [MERGED] SEMANTIC-PACKAGE-TESTS: include package initializers in parallel runner #526

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/474
Author: @bobcatchris
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: semantic-package-tests


📝 Commits (1)

  • b45d7c2 SEMANTIC-PACKAGE-TESTS: run package initializers in parallel

📊 Changes

2 files changed (+55 additions, -7 deletions)

View changed files

📝 scripts/run_semantic_tests.py (+27 -4)
📝 tests/test_run_semantic_tests.py (+28 -3)

📄 Description

Claimed in the coordination issue as: SEMANTIC-PACKAGE-TESTS

What and why

The default parallel translator-test runner selected only files matching test*.py, but unittest discover also imports every package below the suite root and runs TestCase classes defined in a package's __init__.py. A failing test in pkg/__init__.py therefore made -j 1 fail while -j 2 returned green with one fewer test.

test_modules now includes package initializers even when no filename matches the pattern, module_path handles their path when sorting by size, and an empty initializer with no tests is not reported as a failure. Two regressions cover a failing initializer and a pattern that matches no test filenames.

No game files, GPU, dependencies, keys or decryption are involved.

Tested

  • python -I tests/test_run_semantic_tests.py — 12 tests OK
  • synthetic reproduction: -j 1 and -j 2 now both fail on a failing package initializer (previously -j 2 returned 0)
  • python -I scripts/run_semantic_tests.py tests/semantic — 465 files, 6104 tests; only test_image_cube_store_glc failed in this environment, also fails on unpatched main
  • python -I tests/test_ci_registration.py — 15 tests OK
  • python -m compileall -q scripts tests — OK
  • git diff --check — clean
  • security sweep of the diff — 0 hits

GPUs tested: n/a (CPU-only runner and tests)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • Regression test added for the false-green case.

🔄 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/474 **Author:** [@bobcatchris](https://github.com/bobcatchris) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `semantic-package-tests` --- ### 📝 Commits (1) - [`b45d7c2`](https://github.com/ubiquitarianism/leonida/commit/b45d7c2d14e5a4fd0cf11e72852d79d62df417a5) SEMANTIC-PACKAGE-TESTS: run package initializers in parallel ### 📊 Changes **2 files changed** (+55 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `scripts/run_semantic_tests.py` (+27 -4) 📝 `tests/test_run_semantic_tests.py` (+28 -3) </details> ### 📄 Description Claimed in the coordination issue as: SEMANTIC-PACKAGE-TESTS ### What and why The default parallel translator-test runner selected only files matching `test*.py`, but `unittest discover` also imports every package below the suite root and runs TestCase classes defined in a package's `__init__.py`. A failing test in `pkg/__init__.py` therefore made `-j 1` fail while `-j 2` returned green with one fewer test. `test_modules` now includes package initializers even when no filename matches the pattern, `module_path` handles their path when sorting by size, and an empty initializer with no tests is not reported as a failure. Two regressions cover a failing initializer and a pattern that matches no test filenames. No game files, GPU, dependencies, keys or decryption are involved. ### Tested - `python -I tests/test_run_semantic_tests.py` — 12 tests OK - synthetic reproduction: `-j 1` and `-j 2` now both fail on a failing package initializer (previously `-j 2` returned 0) - `python -I scripts/run_semantic_tests.py tests/semantic` — 465 files, 6104 tests; only `test_image_cube_store_glc` failed in this environment, also fails on unpatched `main` - `python -I tests/test_ci_registration.py` — 15 tests OK - `python -m compileall -q scripts tests` — OK - `git diff --check` — clean - security sweep of the diff — 0 hits GPUs tested: n/a (CPU-only runner and tests) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [x] Regression test added for the false-green case. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:10 +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#526
No description provided.