Rev 3932: SampleBzrDir now needs to return a real repo from open_repository in http://bzr.arbash-meinel.com/branches/bzr/1.11/stacking_tweaks
John Arbash Meinel
john at arbash-meinel.com
Fri Jan 9 03:29:06 GMT 2009
At http://bzr.arbash-meinel.com/branches/bzr/1.11/stacking_tweaks
------------------------------------------------------------
revno: 3932
revision-id: john at arbash-meinel.com-20090109031355-rg3grll5bbshstf2
parent: john at arbash-meinel.com-20090108210718-n70cw41ujrwdxifx
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: stacking_tweaks
timestamp: Thu 2009-01-08 21:13:55 -0600
message:
SampleBzrDir now needs to return a real repo from open_repository
-------------- next part --------------
=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py 2008-12-15 04:37:10 +0000
+++ b/bzrlib/tests/test_bzrdir.py 2009-01-09 03:13:55 +0000
@@ -180,7 +180,7 @@
'Pre-0.8 format. Slower and does not support checkouts or shared'
' repositories', deprecated=True, alias=True)
self.assertEqual(frozenset(['weavealias']), a_registry.aliases())
-
+
class SampleBranch(bzrlib.branch.Branch):
"""A dummy branch for guess what, dummy use."""
@@ -189,6 +189,13 @@
self.bzrdir = dir
+class SampleRepository(bzrlib.repository.Repository):
+ """A dummy repo."""
+
+ def __init__(self, dir):
+ self.bzrdir = dir
+
+
class SampleBzrDir(bzrdir.BzrDir):
"""A sample BzrDir implementation to allow testing static methods."""
@@ -198,7 +205,7 @@
def open_repository(self):
"""See BzrDir.open_repository."""
- return "A repository"
+ return SampleRepository(self)
def create_branch(self):
"""See BzrDir.create_branch."""
More information about the bazaar-commits
mailing list