Beispiel #1
0
 def test_savannah(self):
     self.assertEqual(
         "https://git.savannah.gnu.org/git/auctex.git",
         guess_repo_from_url("https://git.savannah.gnu.org/git/auctex.git"),
     )
     self.assertIs(
         None,
         guess_repo_from_url(
             "https://git.savannah.gnu.org/blah/auctex.git"))
Beispiel #2
0
 def test_github(self):
     self.assertEqual(
         "https://github.com/jelmer/blah",
         guess_repo_from_url("https://github.com/jelmer/blah"),
     )
     self.assertEqual(
         "https://github.com/jelmer/blah",
         guess_repo_from_url("https://github.com/jelmer/blah/blob/README"),
     )
     self.assertIs(None, guess_repo_from_url("https://github.com/jelmer"))
Beispiel #3
0
 def test_bitbucket(self):
     self.assertEqual(
         "https://bitbucket.org/fenics-project/dolfin",
         guess_repo_from_url(
             "https://bitbucket.org/fenics-project/dolfin/downloads/"),
     )
Beispiel #4
0
 def test_launchpad(self):
     self.assertEqual(
         "https://code.launchpad.net/bzr",
         guess_repo_from_url("http://launchpad.net/bzr/+download"),
     )
Beispiel #5
0
 def test_known(self):
     self.assertEqual(
         "http://code.launchpad.net/blah",
         guess_repo_from_url("http://code.launchpad.net/blah"),
     )
Beispiel #6
0
 def test_none(self):
     self.assertIs(None, guess_repo_from_url("https://www.jelmer.uk/"))