MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / fake_run

Function fake_run

lib/cli/tests/deploy/test_cli_only_install.py:85–99  ·  view source on GitHub ↗
(
        command: list[str], **kwargs: Any
    )

Source from the content-addressed store, hash-verified

83 captured: dict[str, Any] = {}
84
85 def fake_run(
86 command: list[str], **kwargs: Any
87 ) -> subprocess.CompletedProcess[str]:
88 captured["command"] = command
89 captured["kwargs"] = kwargs
90 payload = {"ok": True, "agent_names": ["researcher"]}
91 return subprocess.CompletedProcess(
92 command,
93 0,
94 stdout=(
95 "uv output\n"
96 f"{validate_module._JSON_VALIDATION_MARKER}{json.dumps(payload)}\n"
97 ),
98 stderr="",
99 )
100
101 monkeypatch.setattr(builtins, "__import__", import_without_crewai)
102 monkeypatch.setattr(shutil, "which", lambda command: "/usr/bin/uv")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected