[PR #1771] OLD-9850: test_ttpf_assets: read the original DDS before the rebuild removes it #1784

Open
opened 2026-11-26 21:18:56 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1771
Author: @potatoe0100
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: carry/old-9850


📝 Commits (1)

  • e01d022 test_ttpf_assets: read the original DDS before the rebuild removes it

📊 Changes

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

View changed files

📝 tests/test_ttpf_assets.py (+5 -2)

📄 Description

Claimed in the coordination issue as: OLD-9850 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7161513239)

What and why

Carries on old PR 9850 (draft #116, branch old-pr/9850, listed in #17; commit author David), rebased on current main with the author's commit kept.

test_profile_added_after_strict_rejection rebuilds the pool with a changed calibration profile and then compared the new file with original.read_bytes(). The rebuild switches the row to a new file and removes the one it replaced (remove_replaced), so that read raises FileNotFoundError on every machine where the bcpack_calibration library is built; without the library the test skips, which is why CI stays green. The test now keeps the original bytes before the rebuild and also checks that the replaced file is gone, which is what remove_replaced promises. Test-only change.

Tested

  • Built tools/bcpack_calibration (cargo build --release --offline, Rust stable, Linux) so the test actually runs instead of skipping.
  • python -I tests/test_ttpf_assets.py on this branch: 31 tests OK (1 skipped, needs RPF9DUMP_DLL).
  • The same with main's test file: FileNotFoundError in test_profile_added_after_strict_rejection (1 error), so this fixes a real failure.

GPUs tested: n/a (no GPU code)

AI-assisted: yes (Claude rebased and tested; the original commit was AI-assisted too)

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 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/1771 **Author:** [@potatoe0100](https://github.com/potatoe0100) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `carry/old-9850` --- ### 📝 Commits (1) - [`e01d022`](https://github.com/ubiquitarianism/leonida/commit/e01d02262f9d6438f3c4c76459b87cb057350ad9) test_ttpf_assets: read the original DDS before the rebuild removes it ### 📊 Changes **1 file changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_ttpf_assets.py` (+5 -2) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9850 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7161513239) ### What and why Carries on old PR 9850 (draft #116, branch `old-pr/9850`, listed in #17; commit author David), rebased on current `main` with the author's commit kept. `test_profile_added_after_strict_rejection` rebuilds the pool with a changed calibration profile and then compared the new file with `original.read_bytes()`. The rebuild switches the row to a new file and removes the one it replaced (`remove_replaced`), so that read raises `FileNotFoundError` on every machine where the `bcpack_calibration` library is built; without the library the test skips, which is why CI stays green. The test now keeps the original bytes before the rebuild and also checks that the replaced file is gone, which is what `remove_replaced` promises. Test-only change. ### Tested - Built `tools/bcpack_calibration` (`cargo build --release --offline`, Rust stable, Linux) so the test actually runs instead of skipping. - `python -I tests/test_ttpf_assets.py` on this branch: 31 tests OK (1 skipped, needs `RPF9DUMP_DLL`). - The same with `main`'s test file: `FileNotFoundError` in `test_profile_added_after_strict_rejection` (1 error), so this fixes a real failure. GPUs tested: n/a (no GPU code) AI-assisted: yes (Claude rebased and tested; the original commit was AI-assisted too) ### 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 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>
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#1784
No description provided.