Пример #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")
Пример #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")
Пример #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")
Пример #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")
Пример #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")
Пример #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")
Пример #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")
Пример #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")