tests: two Windows-only failures on main, the drive-root cases and the mods run case (TEST-WIN-STALE) #81

Manually merged
github merged 1 commit from gh-pr/81/head into gh-pr/81/base 2026-11-26 08:43:33 +00:00
Owner

@⁠natterman12 on GitHub · 2026-11-24 02:14 UTC · original
tests/windows-drive-root-and-mods-launcher → main · +24 −13 · 2 files · 1 commits · merged 2026-11-24 03:09 UTC

Claimed in the coordination issue as: TEST-WIN-STALE (#14)

What and why

Two standard-library tests fail on native Windows on main (9ec34cdf). Both are the test falling behind the tool; neither tool changes here.

tests/test_make_game_paths.py (4 errors in the two drive-root cases, which skip on Linux and macOS)

Since BUILD-2367, main() takes a drive-root dump's top-level names from the version manifest (v["expected_exe"], v["files"]) instead of os.listdir. The two drive-root cases still mocked check() as {} and patched os.listdir, so main() stopped at KeyError: 'expected_exe' (make_game.py:2801) before the rule under test. They now hand check() a small manifest with the same entries the os.listdir patch named, and the dead os.listdir patches are gone.

tests/test_leonida_mods.py (test_run_print_builds_gta6rt_command)

The test wrote only gta6rt.sh into the port folder. runtime_executable() accepts gta6rt.exe alone on Windows, so run --print exited 2 with "has no gta6rt executable". The test now writes the launcher of the platform it runs on.

Nothing is written outside the temporary folder: I checked that the drive-root cases leave no Leonida_Build or Content folder at the drive root (preflight and the runtime stage are mocked, as before).

Tested

No GPU involved. Windows 11, Python 3.15.2:

  • python -I tests/test_make_game_paths.py: 4 errors before, OK (5 tests) after
  • python -I tests/test_leonida_mods.py: 1 failure before, OK (10 tests) after
  • python -I tests/test_text_write_line_endings.py, test_text_encoding.py: OK
  • Not run on Linux or macOS: there the drive-root cases skip and the mods test keeps writing gta6rt.sh, as before.

For context, the full standard-library loop on this machine has 8 red files out of 468 on main. The other six are covered by open pull requests: #26 (test_f64_conversion, test_f64_output_modifiers), #22 (test_joaat_agreement) and #69 (test_bink_names, test_opus_tags, test_world_names).

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

**@⁠natterman12** on GitHub · 2026-11-24 02:14 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/81) `tests/windows-drive-root-and-mods-launcher` → `main` · +24 −13 · 2 files · 1 commits · merged 2026-11-24 03:09 UTC Claimed in the coordination issue as: TEST-WIN-STALE (#14) ### What and why Two standard-library tests fail on native Windows on `main` (9ec34cdf). Both are the test falling behind the tool; neither tool changes here. **`tests/test_make_game_paths.py`** (4 errors in the two drive-root cases, which skip on Linux and macOS) Since BUILD-2367, `main()` takes a drive-root dump's top-level names from the version manifest (`v["expected_exe"]`, `v["files"]`) instead of `os.listdir`. The two drive-root cases still mocked `check()` as `{}` and patched `os.listdir`, so `main()` stopped at `KeyError: 'expected_exe'` (`make_game.py:2801`) before the rule under test. They now hand `check()` a small manifest with the same entries the `os.listdir` patch named, and the dead `os.listdir` patches are gone. **`tests/test_leonida_mods.py`** (`test_run_print_builds_gta6rt_command`) The test wrote only `gta6rt.sh` into the port folder. `runtime_executable()` accepts `gta6rt.exe` alone on Windows, so `run --print` exited 2 with "has no gta6rt executable". The test now writes the launcher of the platform it runs on. Nothing is written outside the temporary folder: I checked that the drive-root cases leave no `Leonida_Build` or `Content` folder at the drive root (preflight and the runtime stage are mocked, as before). ### Tested No GPU involved. Windows 11, Python 3.15.2: - `python -I tests/test_make_game_paths.py`: 4 errors before, OK (5 tests) after - `python -I tests/test_leonida_mods.py`: 1 failure before, OK (10 tests) after - `python -I tests/test_text_write_line_endings.py`, `test_text_encoding.py`: OK - Not run on Linux or macOS: there the drive-root cases skip and the mods test keeps writing `gta6rt.sh`, as before. For context, the full standard-library loop on this machine has 8 red files out of 468 on `main`. The other six are covered by open pull requests: #26 (`test_f64_conversion`, `test_f64_output_modifiers`), #22 (`test_joaat_agreement`) and #69 (`test_bink_names`, `test_opus_tags`, `test_world_names`). 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)
Two standard-library tests fail on native Windows and are skipped or pass
elsewhere:

- test_make_game_paths: since BUILD-2367 main() takes a drive-root dump's
  top-level names from the version manifest, but the two drive-root cases
  still mocked check() as {} and patched os.listdir, so main() raised
  KeyError: 'expected_exe' before reaching the rule under test. They now
  pass a manifest with the same entries.
- test_leonida_mods: test_run_print_builds_gta6rt_command wrote only
  gta6rt.sh, and runtime_executable() accepts only gta6rt.exe on Windows.
  It now writes the launcher of the platform it runs on.

Tests only; no tool changes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:43:32 +00:00
github manually merged commit 12d28c0879 into gh-pr/81/base 2026-11-26 08:43:33 +00:00
Author
Owner

@⁠wavehs on GitHub · 2026-11-24 03:10 UTC · original

Checked this branch here (macOS 15 arm64, CPython 3.15.2): tests/test_make_game_paths.py -> OK (skipped=2), tests/test_leonida_mods.py -> OK. The drive-root half is right: main() now takes the dump's top-level entries from check()'s expected_exe/files and never calls os.listdir, so the patched listing was dead and the empty manifest raised KeyError: 'expected_exe'. I had opened the same drive-root fix separately (#96) before noticing this one; closed it. The mods half duplicates #119 (old PR 9853) as well - either is fine, one of the two can go.

**@⁠wavehs** on GitHub · 2026-11-24 03:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/81#issuecomment-7120843924) Checked this branch here (macOS 15 arm64, CPython 3.15.2): `tests/test_make_game_paths.py` -> `OK (skipped=2)`, `tests/test_leonida_mods.py` -> `OK`. The drive-root half is right: `main()` now takes the dump's top-level entries from `check()`'s `expected_exe`/`files` and never calls `os.listdir`, so the patched listing was dead and the empty manifest raised `KeyError: 'expected_exe'`. I had opened the same drive-root fix separately (#96) before noticing this one; closed it. The mods half duplicates #119 (old PR 9853) as well - either is fine, one of the two can go.
Author
Owner

@⁠wavehs on GitHub · 2026-11-24 03:12 UTC · original

Correction to my last note: the mods half is not on main yet - #119 (old PR 9853) is still open. What did land at 03:10 was my four Windows test fixes (#75 fuzzer/first-look paths, #83 --jobs pinning, #90 cross-drive relpath, #107 Wine runner cwd), plus the earlier batch. So this pull request still carries both halves; whichever of this and #119 lands first, the other's mods hunk can be dropped.

**@⁠wavehs** on GitHub · 2026-11-24 03:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/81#issuecomment-7120869814) Correction to my last note: the mods half is not on `main` yet - #119 (old PR 9853) is still open. What did land at 03:10 was my four Windows test fixes (#75 fuzzer/first-look paths, #83 `--jobs` pinning, #90 cross-drive relpath, #107 Wine runner cwd), plus the earlier batch. So this pull request still carries both halves; whichever of this and #119 lands first, the other's mods hunk can be dropped.
This discussion has been locked. Commenting is limited to contributors.
No description provided.