Every subprocess the command starts, each succeeding.
(monkeypatch: pytest.MonkeyPatch)
| 152 | |
| 153 | @pytest.fixture |
| 154 | def 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 | |
| 166 | def crewai_run(*args: str) -> Result: |
nothing calls this directly
no outgoing calls
no test coverage detected