Example #1
0
def test_creating_python37_package_with_valid_input():
    testargs = ["alppb", "mlbgame", "rebukethe.net", "--python", "3.7"]
    with patch.object(sys, 'argv', testargs):
        with pytest.raises(SystemExit) as pytest_wrapped_e:
            main()

    assert pytest_wrapped_e.type == SystemExit
    assert pytest_wrapped_e.value.code == 0
Example #2
0
def test_creating_python37_package_with_bad_bucket():
    testargs = ["alppb", "mlbgame", "123sdblahalppbdf213", "--python", "3.7"]
    with patch.object(sys, 'argv', testargs):
        with pytest.raises(SystemExit) as pytest_wrapped_e:
            main()

    assert pytest_wrapped_e.type == SystemExit
    assert pytest_wrapped_e.value.code == 1
Example #3
0
#!/usr/bin/env python
"""
Convenience wrapper for running alppb directly from source tree.
"""
from alppb.alppb import main

if __name__ == '__main__':
    main()