def test_cli_with_missing_command(): with pytest.raises(SystemExit) as exc: assemble.cli(["-help"]) # Since -help will be missing assert exc.value.code == 2
def test_cli_with_existing_command(): with pytest.raises(SystemExit) as exc: assemble.cli(["--help"]) # Since --help will always pass assert exc.value.code == 0