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

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

📋 Pull Request Information

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

Base: main ← Head: tests/windows-drive-root-and-mods-launcher


📝 Commits (1)

  • 12d28c0 tests: the drive-root cases give check() a manifest, and the mods run case writes the launcher Windows looks for

📊 Changes

2 files changed (+24 additions, -13 deletions)

View changed files

📝 tests/test_leonida_mods.py (+3 -1)
📝 tests/test_make_game_paths.py (+21 -12)

📄 Description

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


🔄 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/81 **Author:** [@natterman12](https://github.com/natterman12) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `tests/windows-drive-root-and-mods-launcher` --- ### 📝 Commits (1) - [`12d28c0`](https://github.com/ubiquitarianism/leonida/commit/12d28c0879f3de74fc5c64b779e5a0805299d964) tests: the drive-root cases give check() a manifest, and the mods run case writes the launcher Windows looks for ### 📊 Changes **2 files changed** (+24 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_leonida_mods.py` (+3 -1) 📝 `tests/test_make_game_paths.py` (+21 -12) </details> ### 📄 Description 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) --- <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:54 +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#133
No description provided.