def test_get_latest_commit(): sha = get_latest_commit("https://github.com/apache/spark") assert len(sha) == 40 with pytest.raises(UsageError): get_latest_commit("https://google.com") with pytest.raises(Exception): get_latest_commit("https://github.com/apache/nonexistent-repo")
def test_get_latest_commit(): sha = get_latest_commit("https://github.com/apache/spark") assert len(sha) == 40 with pytest.raises(UsageError): get_latest_commit("https://google.com") with pytest.raises(Exception): get_latest_commit("https://github.com/apache/nonexistent-repo")