Initial import of cf-temp-email deploy CLI

This commit is contained in:
mmc
2026-03-26 08:06:02 +08:00
commit 4100e9cf72
29 changed files with 6703 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
from __future__ import annotations
import pytest
from cf_temp_email_deploy.errors import CommandExecutionError
from cf_temp_email_deploy.subprocess_runner import CommandRunner, CommandSpec
def test_command_runner_captures_stdout() -> None:
runner = CommandRunner()
result = runner.run_checked(CommandSpec(args=("python3", "-c", "print('ok')")))
assert result.stdout.strip() == "ok"
def test_command_runner_raises_for_non_zero_exit() -> None:
runner = CommandRunner()
with pytest.raises(CommandExecutionError):
runner.run_checked(CommandSpec(args=("python3", "-c", "raise SystemExit(3)")))