OLD-10030: test(hw_oracle): unit tests for tools/hw_oracle/tsharp.py #1030
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1030"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T17:03:55Z.
Claimed in the coordination issue as: OLD-10030
What and why
Carries forward
old-pr/10030(draft #298) rebased onto currentmain:tests/test_hw_oracle_tsharp.pyfortools/hw_oracle/tsharp.pycovering 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 passedpython -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: passedpython -m compileall -q make_game.py tools tests: cleanGPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed: n/a (no translator rule).Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:34:06Z.
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
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T23:45:04Z.
Hi @klikso, thanks for these tests. I merged this pull request onto current
mainlocally and ran them: they pass, and they also pass on plainmain. The "Is it mergeable?" list in CONTRIBUTING.md asks for "A new test that fails onmainand passes with the pull request", so as it stands this one doesn't show a bug thatmainstill has. If one of these cases did fail before a fix that has since landed, could you say which commit, or add a case that still fails onmain? If the tests are meant to lock in behaviourmainalready has, please say so in the description and a maintainer can decide.AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T11:26:23Z.
#1030 | head
ce3ef9f10f46f74b07661fb7bc463da8e4831533|python3 -I tests/test_hw_oracle_tsharp.py -v| red: 13 passed | green: 13 passed | Passed on both treesThe descriptor tests cover formats, pitch, alignment, field encodings, padding and negative controls. All 13 passed against both trees.
Copied the PR tests onto clean main
4a54aedcb6b66525e0c9f72a6ea10263337c9141for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. Batch claim.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:43:20Z.
Merged, thank you @klikso! This PR (OLD-10030: test(hw_oracle): unit tests for tools/hw_oracle/tsharp.py) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch.
AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.