Every subprocess the run starts, each succeeding, with its environment.
(monkeypatch: pytest.MonkeyPatch)
| 93 | |
| 94 | @pytest.fixture |
| 95 | def children(monkeypatch: pytest.MonkeyPatch) -> list[tuple[list[str], dict[str, str]]]: |
| 96 | """Every subprocess the run starts, each succeeding, with its environment.""" |
| 97 | calls: list[tuple[list[str], dict[str, str]]] = [] |
| 98 | |
| 99 | def fake_run(command: list[str], **kwargs: Any) -> subprocess.CompletedProcess[str]: |
| 100 | calls.append((command, dict(kwargs.get("env") or {}))) |
| 101 | return subprocess.CompletedProcess(command, 0) |
| 102 | |
| 103 | monkeypatch.setattr(subprocess, "run", fake_run) |
| 104 | return calls |
| 105 | |
| 106 | |
| 107 | @pytest.fixture |
nothing calls this directly
no outgoing calls
no test coverage detected