Repository navigation
Test the journal, its calendar and the count page - #9
Merged
Merged
Conversation
The journal was 17% covered and winter.calendar and Galley.sum had no test of their own. These characterise what each page says today: the descriptor's counts, registry order and trail markers, the leads that drop away as facts are found, the calendar rows that appear as the ice, the storm and the dark flight become known, and the count's arithmetic short, closed and with the manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (scored after
Notes for the reviewer:
This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage B (unit-test expansion) cycle — no production code is changed. The journal is the player's own record of the winter, but
scenes/journal.pywas 17% covered, andwinter.calendarandGalley.sum(the count page the journal shows) had no tests of their own. A newtests/test_journal.pycharacterises what each page says today:facts.FACTS, and progress alongfacts.TRAIL.*/-trail markers.winter.calendar): only the plane at first; the ice once heard of (THE_ICE) or lived through; the storm once it has come; the dark flight only while it is coming (gone once the ending is set).Galley.sum): the opening sum is four days short; with Aksel at the table on half rations the sum closes and the manifest line names the 24 missing rations.Coverage:
scenes/journal.py17% → 100%,winter.py90% → 99%,scenes/galley.py78% → 91%. The tests use the existingFakeGameandScriptedUIfromtests/conftest.py. No real network or save I/O is used.No production behaviour looked wrong while these tests were written, so no bug issue was filed.
No tracking issue — the backlog was empty at triage (no open issues or PRs), so this cycle was spent on test expansion. A Stage A documentation sweep was done first: README's counts (18 facts, a trail of 5, 20 days, 3 watches, three endings) and its food arithmetic (60/12/8 rations, nineteen nights to the plane), along with
docs/STORY.md's count and choices, were checked againstfacts.py,state.pyandwinter.py. No drift was found.Test plan
python3 -m compileall -q src testspython3 -m pytest— 57 passed (45 existing + 12 new)tests/test_game.py/tests/test_endings.pyunchanged and passingRun Unit Testsgreen on the PR headblack --checkcould not be run in this sandbox (the command needed approval that a headless run cannot give). The file was hand-wrapped to 88 columns in black's style, but it has not been checked by black.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson