OLD-10030: test(hw_oracle): unit tests for tools/hw_oracle/tsharp.py #1030

Open
github-bot wants to merge 1 commit from github-bot/gh-1030 into main AGit
Owner

@⁠klikso on GitHub · 2026-11-24 17:03 UTC · original
klikso:carry/old-10030-hw-oracle-tsharp-tests → main · +233 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: OLD-10030

What and why

Carries forward old-pr/10030 (draft #298) rebased onto current main:

  • Adds unit tests in tests/test_hw_oracle_tsharp.py for tools/hw_oracle/tsharp.py covering T-sharp resource descriptor decoding, buffer/image format extraction, stride calculation, and field parsing.

Original commit preserved: Ritolino <[email protected]>.

Tested

  • python -I tests/test_hw_oracle_tsharp.py: 13/13 passed
  • python -I scripts/check_no_game_data.py tests/test_hw_oracle_tsharp.py: passed (no game data)
  • python -I tests/test_text_write_line_endings.py: passed
  • python -m compileall -q make_game.py tools tests: clean

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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: n/a (no translator rule).
**@⁠klikso** on GitHub · 2026-11-24 17:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1030) `klikso:carry/old-10030-hw-oracle-tsharp-tests` → `main` · +233 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: OLD-10030 ### What and why Carries forward `old-pr/10030` (draft #298) rebased onto current `main`: - Adds unit tests in `tests/test_hw_oracle_tsharp.py` for `tools/hw_oracle/tsharp.py` covering T-sharp resource descriptor decoding, buffer/image format extraction, stride calculation, and field parsing. Original commit preserved: `Ritolino <230431388+[email protected]>`. ### Tested - `python -I tests/test_hw_oracle_tsharp.py`: 13/13 passed - `python -I scripts/check_no_game_data.py tests/test_hw_oracle_tsharp.py`: passed (no game data) - `python -I tests/test_text_write_line_endings.py`: passed - `python -m compileall -q make_game.py tools tests`: clean GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (no translator rule).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:24 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 14:34 UTC · original

Reviewed ce3ef9f10: adds tests/test_hw_oracle_tsharp.py only; ran it with python -I on the PR tree and on main with the file copied in - 13/13 OK in both, as expected for a test-only PR against an unchanged tsharp.py. Mutation-tested the module (RESOURCE_LEVEL, WIDTH_HI mask, PITCH_MSB, the 256-byte pitch rule): the suite catches all four, so the new boundary/layout tests are load-bearing. No finding. AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 14:34 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1030#issuecomment-7165476481) Reviewed ce3ef9f10: adds tests/test_hw_oracle_tsharp.py only; ran it with python -I on the PR tree and on main with the file copied in - 13/13 OK in both, as expected for a test-only PR against an unchanged tsharp.py. Mutation-tested the module (RESOURCE_LEVEL, WIDTH_HI mask, PITCH_MSB, the 256-byte pitch rule): the suite catches all four, so the new boundary/layout tests are load-bearing. No finding. AI-assisted review. **Recommendation:** Merge
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1030/head:github-bot/gh-1030'
git switch 'github-bot/gh-1030'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1030'
git switch 'github-bot/gh-1030'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1030'
git switch 'github-bot/gh-1030'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1030'
git switch 'main'
git merge --squash 'github-bot/gh-1030'
git switch 'main'
git merge --ff-only 'github-bot/gh-1030'
git switch 'main'
git merge 'github-bot/gh-1030'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.