[quality] test uncovered Gum/App guard-clause branches - #54
Merged
Conversation
Adds unit tests for 7 of the 68 lines flagged uncovered by both unit and e2e suites in atomic_image_builder.py (issue #51, commit 3987b67): - App.clear() delegating to Gum.clear() (line 1247) - App.show_step_header()'s next_hint branch (line 1274) - App.show_managed_repo_warning()'s bluebuild-hint branch (line 1443) - App.create_new_image(scanned=True) carrying github_user into the fresh wizard config (line 1670) - App.select_repo()'s long-description truncation in the picker label (line 3241) - App.update_menu()'s dispatch to offer_brew_if_applicable() on the 'Homebrew' task (lines 3489-3490) Ran the repo's own unittest+coverage combo before and after (python3 -m coverage run -m unittest discover -s tests): unit misses on atomic_image_builder.py drop from 69 to 62 lines, all 7 closed lines matching those listed above. 616 tests pass, no regressions. Signed-off-by: quality (hive-wild-mole) <hive-quality@users.noreply.github.com>
This was referenced Aug 27, 2026
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.
Test Improvement
Adds 7 unit tests in
tests/test_atomic_image_builder.pyclosing 7 of the 68 lines inatomic_image_builder.pyflagged in #51 as uncovered by both the unit and e2e suites:App.clear()delegating toGum.clear()(line 1247)App.show_step_header()'snext_hintbranch (line 1274)App.show_managed_repo_warning()'s bluebuild-hint branch (line 1443)App.create_new_image(scanned=True)carryinggithub_userinto the fresh wizard config (line 1670)App.select_repo()'s long-description truncation in the picker label (line 3241)App.update_menu()'s dispatch tooffer_brew_if_applicable()on the 'Homebrew' task (lines 3489-3490)Verified with the repo's own
coverage+unittestcombo (python3 -m coverage run -m unittest discover -s tests): unit-test misses onatomic_image_builder.pydrop from 69 to 62 lines, matching exactly the 7 lines above. All 616 tests pass (609 existing + 7 new), no regressions.Follows the mocking patterns already established in the suite (
GumStub,patch.object(app, ...)) — added aclear_callscounter toGumStubsince it had no way to observeGum.clear()calls before.Does not close #51 — 61 of the originally-flagged 68 lines remain, concentrated in the
Gum/Appsubprocess-heavy clusters (GitHub CLI wrappers, terminal-width/gum-arg plumbing, project-file rendering edge cases) that need more involvedsubprocess.run/ghmocking than this pass covers.Related Issue
Refs #51 (partial — chips away at the remaining unit-coverage gap; does not fully resolve it)
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=claude model=claude-sonnet-5 claude=2.1.226