Exemplo n.º 1
0
    def test_hg(self):
        repo_url = "ssh://[email protected]/pydanny/static"
        self.assertEqual(identify_vcs(repo_url), "hg")

        repo_url = "http://bitbucket.org/pydanny/static"
        with self.assertRaises(UnknownVCS):
            identify_vcs(repo_url)
        self.assertEqual(identify_vcs(repo_url, guess=True), "hg")

        repo_url = "https://[email protected]/pydanny/static"
        self.assertEqual(identify_vcs(repo_url, guess=True), "hg")
Exemplo n.º 2
0
    def test_hg(self):
        repo_url = "ssh://[email protected]/pydanny/static"
        self.assertEqual(identify_vcs(repo_url), "hg")

        repo_url = "http://bitbucket.org/pydanny/static"
        with self.assertRaises(UnknownVCS):
            identify_vcs(repo_url)
        self.assertEqual(identify_vcs(repo_url, guess=True), "hg")

        repo_url = "https://[email protected]/pydanny/static"
        self.assertEqual(identify_vcs(repo_url, guess=True), "hg")
Exemplo n.º 3
0
    def test_svn(self):
        # easy check
        repo_url = "http://svn.code.sf.net/p/docutils/code/trunk"
        self.assertEqual(identify_vcs(repo_url), "svn")

        # Throw an error because it can't find the Repo host
        repo_url = "docutils.svn.sourceforge.net"
        with self.assertRaises(UnknownVCS):
            identify_vcs(repo_url)

        # make a guess
        self.assertEqual(identify_vcs(repo_url, guess=True), "svn")
Exemplo n.º 4
0
    def test_svn(self):
        # easy check
        repo_url = "http://svn.code.sf.net/p/docutils/code/trunk"
        self.assertEqual(identify_vcs(repo_url), "svn")

        # Throw an error because it can't find the Repo host
        repo_url = "docutils.svn.sourceforge.net"
        with self.assertRaises(UnknownVCS):
            identify_vcs(repo_url)

        # make a guess
        self.assertEqual(identify_vcs(repo_url, guess=True), "svn")
Exemplo n.º 5
0
    def test_custom(self):
        repo_aliases = tuple(list(REPO_ALIASES) + ['bzr'])
        repo_url = "http://bzr.example.com/"

        self.assertEqual(
            identify_vcs(repo_url, guess=True, repo_aliases=repo_aliases),
            "bzr")
Exemplo n.º 6
0
 def test_git(self):
     repo_url = "[email protected]:pydanny/watdarepo.git"
     self.assertEqual(identify_vcs(repo_url), "git")
     repo_url = "https://github.com/pydanny/watdarepo.git"
     self.assertEqual(identify_vcs(repo_url), "git")
Exemplo n.º 7
0
    def test_custom(self):
        repo_aliases = tuple(list(REPO_ALIASES) + ['bzr'])
        repo_url = "http://bzr.example.com/"

        self.assertEqual(identify_vcs(repo_url, guess=True, repo_aliases=repo_aliases), "bzr")
Exemplo n.º 8
0
 def test_git(self):
     repo_url = "[email protected]:pydanny/watdarepo.git"
     self.assertEqual(identify_vcs(repo_url), "git")
     repo_url = "https://github.com/pydanny/watdarepo.git"
     self.assertEqual(identify_vcs(repo_url), "git")