From fc05b5eed2682694c8f0ed49d5ad27551446c8da Mon Sep 17 00:00:00 2001 From: X-iZhang Date: Wed, 10 Jun 2026 16:11:49 +0100 Subject: [PATCH] fix(tests): ensure _check_npx is True in _patch_all_questionary to prevent extra prompts on slow runners --- tests/test_onboard.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_onboard.py b/tests/test_onboard.py index f063caf..5762e78 100644 --- a/tests/test_onboard.py +++ b/tests/test_onboard.py @@ -29,6 +29,11 @@ def _patch_all_questionary(mock_q): (steps/helpers/channels/style/wizard), and each submodule binds its own ``questionary`` name at import time. Patching just one location wouldn't intercept calls made from the others. + + Also forces ``_check_npx`` to True so the skills-step easter egg never + probes the host: on runners where npx is missing/slow, ``_ensure_npx`` + would otherwise fire an extra ``questionary.confirm`` and shift the + mocked side_effect sequences (platform-dependent StopIteration). """ with ( patch("EvoScientist.config.onboard.wizard.questionary", mock_q), @@ -36,6 +41,7 @@ def _patch_all_questionary(mock_q): patch("EvoScientist.config.onboard.helpers.questionary", mock_q), patch("EvoScientist.config.onboard.channels.questionary", mock_q), patch("EvoScientist.config.onboard.style.questionary", mock_q), + patch("EvoScientist.config.onboard.helpers._check_npx", return_value=True), ): yield mock_q