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

Function commands

lib/cli/tests/test_run_usage.py:154–163  ·  view source on GitHub ↗

Every subprocess the command starts, each succeeding.

(monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

152
153@pytest.fixture
154def commands(monkeypatch: pytest.MonkeyPatch) -> list[tuple[list[str], dict[str, str]]]:
155 """Every subprocess the command starts, each succeeding."""
156 calls: list[tuple[list[str], dict[str, str]]] = []
157
158 def fake_run(command: list[str], **kwargs: Any) -> subprocess.CompletedProcess[str]:
159 calls.append((command, kwargs.get("env") or {}))
160 return subprocess.CompletedProcess(command, 0)
161
162 monkeypatch.setattr(subprocess, "run", fake_run)
163 return calls
164
165
166def crewai_run(*args: str) -> Result:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected