93
94
class TestCaseWithRepository(TestCaseWithControlDir):
95
def make_repository(self, relpath, shared=False, format=None):
96
def get_default_format(self):
97
format = self.repository_format._matchingbzrdir
98
self.assertEquals(format.repository_format, self.repository_format)
101
def make_repository(self, relpath, shared=None, format=None):
102
format = self.resolve_format(format)
103
repo = super(TestCaseWithRepository, self).make_repository(
104
relpath, shared=shared, format=format)
105
if format is None or format.repository_format is self.repository_format:
97
106
# Create a repository of the type we are trying to test.
98
made_control = self.make_bzrdir(relpath)
99
repo = self.repository_format.initialize(made_control,
101
107
if getattr(self, "repository_to_test_repository", None):
102
108
repo = self.repository_to_test_repository(repo)
105
return super(TestCaseWithRepository, self).make_repository(
106
relpath, shared=shared, format=format)
109
112
def load_tests(standard_tests, module, loader):