Exemplo n.º 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"))
Exemplo n.º 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"))
Exemplo n.º 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/"),
     )
Exemplo n.º 4
0
 def test_launchpad(self):
     self.assertEqual(
         "https://code.launchpad.net/bzr",
         guess_repo_from_url("http://launchpad.net/bzr/+download"),
     )
Exemplo n.º 5
0
 def test_known(self):
     self.assertEqual(
         "http://code.launchpad.net/blah",
         guess_repo_from_url("http://code.launchpad.net/blah"),
     )
Exemplo n.º 6
0
 def test_none(self):
     self.assertIs(None, guess_repo_from_url("https://www.jelmer.uk/"))