fix(cli): isolate management subprocess environments

This commit is contained in:
Xubin Ren committed 2026-08-12 21:09:29 +09:00
1 parent 5fc8303f9e
commit edaef4e4f5
3 files changed
+25

No files matched your search

+3
View File
@@ -442,12 +442,15 @@ def test_run_argv_logs_command_exit_and_output(
encoding: str,
errors: str,
timeout: int,
env: dict[str, str],
) -> subprocess.CompletedProcess[str]:
assert capture_output is True
assert text is True
assert encoding == "utf-8"
assert errors == "replace"
assert timeout == 5
assert "OPENAI_API_KEY" not in env
assert env["PYTHONUNBUFFERED"] == "1"
return subprocess.CompletedProcess(argv, 0, stdout="installed ok", stderr="")
monkeypatch.setattr(cli_service, "logger", _Logger())