Add test for showInteractiveDialogue's no-options fallback - #137
Merged
dmccoystephenson merged 1 commit intoAug 1, 2026
Merged
Conversation
BaseUserInterface.showInteractiveDialogue's branch for an NPC with zero currently-available dialogue options (e.g. every option's condition is false) was untested, despite being shared logic the pygame and web front-ends both inherit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric:
Repo-specific:
Coverage on No open issues or PRs existed at Phase 1 triage, so no backlog was deferred this cycle. |
dmccoystephenson
deleted the
feature/test-base-ui-empty-dialogue-options
branch
August 1, 2026 07:38
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
*JsonReaderWriters, README/PLANNING.md/Dockerfile/requirements.txt/install scripts all match actual behavior, money/price displays are correctly%.2f(or legitimately always-integer, using%d), no test relies on unseededrandom, and no test hits a real filesystem/display.pytest --cov=src) showedsrc/ui/baseUserInterface.pyat 82%, the lowest of any module. The uncovered non-abstract lines wereshowInteractiveDialogue's fallback branch for an NPC with zero currently-available dialogue options (e.g. every option'sconditionis false) — this is shared logic both the pygame and web front-ends inherit without override, so it's real production behavior, just never exercised by a test.test_inherited_interactive_dialogue_falls_back_to_introduction_when_no_options, characterizing the current (correct) behavior: the NPC'sintroduce()text is shown viashowDialogueinstead of an empty question menu.Per the entire-untouched-backlog note: there was no backlog to defer — zero open issues and zero open PRs at triage time, and no functional bugs were found during the review, so this cycle's only outcome is the test-expansion work above (Phase 2 Stage B).
Test plan
python3 -m compileall -q srcpytest, headless SDL) — 464 passed, up from 463src/ui/baseUserInterface.pyrose from 82% → 88%; all remaining uncovered lines are unreachable@abstractmethodpassstub bodies