From 45df6823c917aebd4890d11bbe9b60564c0ea563 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Mon, 24 Aug 2026 21:34:04 -0700 Subject: [PATCH] Add Regression Coverage for the Two Install-Summary Lines MainExitCodeCase asserted only main()'s exit code, so nothing caught a regression back to one combined print line. Add a case that captures stdout and asserts the skills-materialized and marketplace-registered messages land on separate lines. Found by CodeRabbit on PR #982's review of #981/#983's change. --- scripts/tests/test_skills_install.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/tests/test_skills_install.py b/scripts/tests/test_skills_install.py index 15bc0f75..058b4a98 100755 --- a/scripts/tests/test_skills_install.py +++ b/scripts/tests/test_skills_install.py @@ -7,6 +7,8 @@ from __future__ import annotations +import contextlib +import io import json import os import shutil @@ -399,6 +401,16 @@ def test_claude_absent_is_a_partial_install_not_a_failure(self) -> None: mock.patch("skills_install.claude_available", return_value=False).start() self.assertEqual(skills_install.main(), 0) + def test_skills_and_marketplace_outcomes_print_on_separate_lines(self) -> None: + mock.patch("skills_install.claude_available", return_value=True).start() + mock.patch("skills_install.register_claude_marketplace", return_value=True).start() + out = io.StringIO() + with contextlib.redirect_stdout(out): + skills_install.main() + lines = out.getvalue().splitlines() + self.assertIn(f"Skills materialized to {self.tmp / 'skills'}.", lines) + self.assertIn("Claude Code marketplace registered: True.", lines) + LINUX_WRAPPER = ( Path(__file__).resolve().parent.parent.parent / "host-setup" / "linux" / "install-skills.sh"