Rev 1418: Fix tests. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4
Jelmer Vernooij
jelmer at samba.org
Tue Jul 1 22:10:11 BST 2008
At http://people.samba.org/bzr/jelmer/bzr-svn/0.4
------------------------------------------------------------
revno: 1418
revision-id: jelmer at samba.org-20080701211009-0k0y2es919vf4v9w
parent: jelmer at samba.org-20080701204236-1798iubpwn6it8r9
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Tue 2008-07-01 23:10:09 +0200
message:
Fix tests.
modified:
tests/__init__.py __init__.py-20060508151940-e9f4d914801a2535
tests/test_branch.py test_branch.py-20060508162215-74ffeb5d608f8e20
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py 2008-06-29 13:06:40 +0000
+++ b/tests/__init__.py 2008-07-01 21:10:09 +0000
@@ -173,11 +173,6 @@
self.client_ctx.checkout(repos_url, relpath, "HEAD")
@staticmethod
- def create_checkout(branch, path, revision_id=None, lightweight=False):
- return branch.create_checkout(path, revision_id=revision_id,
- lightweight=lightweight)
-
- @staticmethod
def open_checkout(url):
return WorkingTree.open(url)
=== modified file 'tests/test_branch.py'
--- a/tests/test_branch.py 2008-06-26 22:38:40 +0000
+++ b/tests/test_branch.py 2008-07-01 21:10:09 +0000
@@ -143,8 +143,8 @@
def test_repr(self):
repos_url = self.make_repository('a')
- branch = Branch.open("svn+"+repos_url)
- self.assertEqual("SvnBranch('svn+%s')" % repos_url, branch.__repr__())
+ branch = Branch.open(repos_url)
+ self.assertEqual("SvnBranch('%s')" % repos_url, branch.__repr__())
def test_get_physical_lock_status(self):
repos_url = self.make_repository('a')
@@ -624,7 +624,7 @@
url = "svn+"+repos_url+"/trunk"
oldbranch = Branch.open(url)
- newtree = self.create_checkout(oldbranch, "e")
+ newtree = oldbranch.create_checkout("e")
self.assertTrue(newtree.branch.repository.has_revision(
oldbranch.generate_revision_id(1)))
@@ -639,10 +639,8 @@
trunk.add_file("trunk/hosts")
dc.close()
- url = "svn+"+repos_url+"/trunk"
- oldbranch = Branch.open(url)
-
- newtree = self.create_checkout(oldbranch, "e", lightweight=True)
+ oldbranch = Branch.open(repos_url+"/trunk")
+ newtree = oldbranch.create_checkout("e", lightweight=True)
self.assertEqual(oldbranch.generate_revision_id(1), newtree.base_revid)
self.assertTrue(os.path.exists("e/.svn"))
self.assertFalse(os.path.exists("e/.bzr"))
@@ -663,7 +661,7 @@
url = "svn+"+repos_url+"/trunk"
oldbranch = Branch.open(url)
- newtree = self.create_checkout(oldbranch, "e", revision_id=
+ newtree = oldbranch.create_checkout("e", revision_id=
oldbranch.generate_revision_id(1), lightweight=True)
self.assertEqual(oldbranch.generate_revision_id(1),
newtree.base_revid)
More information about the bazaar-commits
mailing list