コード例 #1
0
ファイル: test_assemble.py プロジェクト: kracekumar/assemble
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
コード例 #2
0
ファイル: test_assemble.py プロジェクト: kracekumar/assemble
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