From 592d27f8089d499e955c5cab03d3c156b33ccd50 Mon Sep 17 00:00:00 2001 From: Joao Moura Date: Tue, 7 Jul 2026 13:05:12 -0700 Subject: [PATCH] test(crewai): update mirrored CLI test after run_crew input refactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lib/crewai/tests/cli/test_run_crew.py imports crewai_cli internals and is collected by the lib/crewai test job (Run Tests). It still imported _prompt_for_missing_inputs, which was replaced by _resolve_crew_inputs, so the module failed to import — erroring pytest at collection and cancelling the rest of the matrix via fail-fast. Point it at _resolve_crew_inputs and patch the prompt in the shared crewai_cli.input_prompt module where prompting now lives. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh --- lib/crewai/tests/cli/test_run_crew.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/crewai/tests/cli/test_run_crew.py b/lib/crewai/tests/cli/test_run_crew.py index c58772083..880c00930 100644 --- a/lib/crewai/tests/cli/test_run_crew.py +++ b/lib/crewai/tests/cli/test_run_crew.py @@ -14,7 +14,7 @@ from crewai_cli.run_crew import ( _execute_uv_script, _load_json_crew_for_tui, _missing_input_names, - _prompt_for_missing_inputs, + _resolve_crew_inputs, ) @@ -105,7 +105,7 @@ def test_missing_input_names_scans_agent_and_task_placeholders() -> None: ] -def test_prompt_for_missing_inputs_merges_runtime_values(monkeypatch) -> None: +def test_resolve_crew_inputs_merges_runtime_values(monkeypatch) -> None: crew = SimpleNamespace( agents=[SimpleNamespace(role="Researcher", goal="Cover {topic}", backstory="")], tasks=[ @@ -123,9 +123,10 @@ def test_prompt_for_missing_inputs_merges_runtime_values(monkeypatch) -> None: return values["audience"] raise AssertionError(f"Unexpected prompt: {label}") - monkeypatch.setattr("crewai_cli.run_crew.click.prompt", prompt) + # Prompting now lives in the shared crewai_cli.input_prompt helper. + monkeypatch.setattr("crewai_cli.input_prompt.click.prompt", prompt) - assert _prompt_for_missing_inputs(crew, {"topic": "AI"}) == { + assert _resolve_crew_inputs(crew, {"topic": "AI"}, None, interactive=True) == { "topic": "AI", "audience": "developers", }