Files
TJWaterServerBinary/tests/unit/test_clean_projects_cli.py
T

18 lines
465 B
Python

import pytest
from scripts.clean_projects import parse_args
def test_clean_projects_requires_explicit_confirmation() -> None:
with pytest.raises(SystemExit) as exc_info:
parse_args(["temporary_project"])
assert exc_info.value.code == 2
def test_clean_projects_accepts_exact_targets_after_confirmation() -> None:
args = parse_args(["--yes", "temp_a", "temp_b"])
assert args.yes is True
assert args.projects == ["temp_a", "temp_b"]