[PR #1] [MERGED] test_make_game_argparse: the --jobs 10 case no longer needs 10 hardware threads #61

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

📋 Pull Request Information

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

Base: main ← Head: test/jobs-clamp-cpu-count


📝 Commits (1)

  • 63c5ece test_make_game_argparse: the --jobs 10 case no longer needs 10 hardware threads

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 tests/test_make_game_argparse.py (+2 -1)

📄 Description

Claimed in the coordination issue as: not claimed. This repository has no coordination issue yet; on the original one I had posted it as a finding: shortly before that repository went away.

What and why

tests/test_make_game_argparse.py JobsHandlingTest.test_custom_jobs_forwarded_to_assets fails on any machine with fewer than 10 hardware threads.

make_game.main() clamps --jobs to the machine's hardware threads (leonida_tui.clamp_jobs), so the test's --jobs 10 reaches assets() as the thread count and the assertion fails:

Expected: assets(<game>, <work>, True, 10, dump_jobs=None)
  Actual: assets(<game>, <work>, True, 6, dump_jobs=None)

The tool is right; the test depends on the machine that runs it. This pins os.cpu_count to 16 inside that one test, so 10 is in range anywhere. One file changed, two lines added and one removed; no tool code is touched.

Tested

macOS arm64 (6 hardware threads), Python 3.14.6, CPU only, no game files:

  • python -I tests/test_make_game_argparse.py: 1 failure in 38 tests on main 8eee35cfd; no failures with this change (38 run, 1 skipped).
  • python -m compileall -q make_game.py tools tests: pass.
  • python -I make_game.py --help: pass.
  • python -I scripts/check_no_game_data.py tests/test_make_game_argparse.py: pass.

Not run: Linux, Windows, any GPU test, the translator suite (no translator code changes). I have not checked a machine with 10 or more threads, where the test already passed before this change.

AI-assisted: yes (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: no translator change.)

🤖 Generated with Claude Code


🔄 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/1 **Author:** [@Rareuncommon](https://github.com/Rareuncommon) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `test/jobs-clamp-cpu-count` --- ### 📝 Commits (1) - [`63c5ece`](https://github.com/ubiquitarianism/leonida/commit/63c5ece18c250c871409383afd4a89b69706a155) test_make_game_argparse: the --jobs 10 case no longer needs 10 hardware threads ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_make_game_argparse.py` (+2 -1) </details> ### 📄 Description Claimed in the coordination issue as: not claimed. This repository has no coordination issue yet; on the original one I had posted it as a `finding:` shortly before that repository went away. ### What and why `tests/test_make_game_argparse.py` `JobsHandlingTest.test_custom_jobs_forwarded_to_assets` fails on any machine with fewer than 10 hardware threads. `make_game.main()` clamps `--jobs` to the machine's hardware threads (`leonida_tui.clamp_jobs`), so the test's `--jobs 10` reaches `assets()` as the thread count and the assertion fails: ``` Expected: assets(<game>, <work>, True, 10, dump_jobs=None) Actual: assets(<game>, <work>, True, 6, dump_jobs=None) ``` The tool is right; the test depends on the machine that runs it. This pins `os.cpu_count` to 16 inside that one test, so 10 is in range anywhere. One file changed, two lines added and one removed; no tool code is touched. ### Tested macOS arm64 (6 hardware threads), Python 3.14.6, CPU only, no game files: - `python -I tests/test_make_game_argparse.py`: 1 failure in 38 tests on `main` `8eee35cfd`; no failures with this change (38 run, 1 skipped). - `python -m compileall -q make_game.py tools tests`: pass. - `python -I make_game.py --help`: pass. - `python -I scripts/check_no_game_data.py tests/test_make_game_argparse.py`: pass. Not run: Linux, Windows, any GPU test, the translator suite (no translator code changes). I have not checked a machine with 10 or more threads, where the test already passed before this change. AI-assisted: yes (Claude Code). ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable: no translator change.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:16:40 +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#61
No description provided.