summaryrefslogtreecommitdiff
path: root/tests/test_vcs_bazaar.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-02-16 21:09:00 +0100
committerJannis Leidel <jannis@leidel.info>2012-02-16 21:09:00 +0100
commitee554dd82b8bc6ed9a3cf989b353126580fcc082 (patch)
treeb0604f39ed465673316fe94ffa29046ed868aafc /tests/test_vcs_bazaar.py
parent47f1b2c2b2523469e6107cb2ef325eb61fa8fcf1 (diff)
parent40ac381fad2cc31f75014f02d3e8bf755d933abb (diff)
downloadpip-1.1.tar.gz
Merge branch 'release/1.1'1.1
Diffstat (limited to 'tests/test_vcs_bazaar.py')
-rw-r--r--tests/test_vcs_bazaar.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/test_vcs_bazaar.py b/tests/test_vcs_bazaar.py
new file mode 100644
index 000000000..4e43fe5f9
--- /dev/null
+++ b/tests/test_vcs_bazaar.py
@@ -0,0 +1,29 @@
+from tests.test_pip import pyversion
+from pip.vcs.bazaar import Bazaar
+
+if pyversion >= '3':
+ VERBOSE_FALSE = False
+else:
+ VERBOSE_FALSE = 0
+
+
+def test_bazaar_simple_urls():
+ """
+ Test bzr url support.
+
+ SSH and launchpad have special handling.
+ """
+ http_bzr_repo = Bazaar(url='bzr+http://bzr.myproject.org/MyProject/trunk/#egg=MyProject')
+ https_bzr_repo = Bazaar(url='bzr+https://bzr.myproject.org/MyProject/trunk/#egg=MyProject')
+ ssh_bzr_repo = Bazaar(url='bzr+ssh://bzr.myproject.org/MyProject/trunk/#egg=MyProject')
+ ftp_bzr_repo = Bazaar(url='bzr+ftp://bzr.myproject.org/MyProject/trunk/#egg=MyProject')
+ sftp_bzr_repo = Bazaar(url='bzr+sftp://bzr.myproject.org/MyProject/trunk/#egg=MyProject')
+ launchpad_bzr_repo = Bazaar(url='bzr+lp:MyLaunchpadProject#egg=MyLaunchpadProject')
+
+ assert http_bzr_repo.get_url_rev() == ('http://bzr.myproject.org/MyProject/trunk/', None)
+ assert https_bzr_repo.get_url_rev() == ('https://bzr.myproject.org/MyProject/trunk/', None)
+ assert ssh_bzr_repo.get_url_rev() == ('bzr+ssh://bzr.myproject.org/MyProject/trunk/', None)
+ assert ftp_bzr_repo.get_url_rev() == ('ftp://bzr.myproject.org/MyProject/trunk/', None)
+ assert sftp_bzr_repo.get_url_rev() == ('sftp://bzr.myproject.org/MyProject/trunk/', None)
+ assert launchpad_bzr_repo.get_url_rev() == ('lp:MyLaunchpadProject', None)
+