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
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
#!/usr/bin/env python """ Convenience wrapper for running alppb directly from source tree. """ from alppb.alppb import main if __name__ == '__main__': main()