mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #2232] [CLOSED] stage_timeline: a missing or unreadable log is one error line; add unit tests (TOOL-STAGE-TIMELINE-TESTS) #2237
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2237
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2232
Author: @real-rusher
Created: 11/26/2026
Status: ❌ Closed
Base:
main← Head:stage-timeline-tests📝 Commits (2)
4e34d30stage_timeline: a missing or unreadable log is one error line, not a tracebackafeee54tests: unit tests for tools/stage_timeline.py📊 Changes
2 files changed (+171 additions, -1 deletions)
View changed files
➕
tests/test_stage_timeline.py(+166 -0)📝
tools/stage_timeline.py(+5 -1)📄 Description
Claimed in the coordination issue as: TOOL-STAGE-TIMELINE-TESTS (#1608)
What and why
tools/stage_timeline.py had no tests, and a wrong path or a folder ended in a FileNotFoundError or IsADirectoryError traceback. It now prints
stage_timeline: error: cannot read <log>: <reason>and exits 2, like awc_names and check_no_game_data.tests/test_stage_timeline.py covers read() and timeline() on synthetic logs (stage changes, "?" and list values, the session low dword, unknown values, press pairing, the loading screen end) and the command line (text and JSON reports, no peek lines, a missing log, a folder). Standard library only, no game data.
Tested
python -I tests/test_stage_timeline.py: 13 tests pass. On main, the two error tests fail and the other 11 pass.
Also run: python -m compileall -q make_game.py tools tests, scripts/check_no_game_data.py on both files, tests/test_ci_registration.py, tests/test_text_write_line_endings.py. All pass. Linux, Python 3.13.
GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a, no translator change)🤖 Assisted by Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.