def test_invalid_urls(self): urls = [ 'https://github.com/a;bc/xyz.git', 'https://github.com/abc/x;yz.git', 'https://github.com/a bc/xyz.git', 'https://github.com/abc/x yz.git', ] for url in urls: with raises(BadRepositoryURL): parse_github_url(url)
def test_valid_urls(self): urls = [ 'https://github.com/abc/xyz.git', 'https://github.com/abc/xyz', 'https://github.com/abc-def/uvw-xyz', '[email protected]:abc/xyz.git', '[email protected]:abc/xyz', '[email protected]:abc-def/uvw-xyz', ] for url in urls: parse_github_url(url)