~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/__init__.py

  • Committer: Mark Hammond
  • Date: 2008-12-28 05:21:23 UTC
  • mfrom: (3920 +trunk)
  • mto: (3932.1.1 prepare-1.11)
  • mto: This revision was merged to the branch mainline in revision 3937.
  • Revision ID: mhammond@skippinet.com.au-20081228052123-f78xs5sbdkotshwf
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        except errors.UninitializableFormat:
102
102
            raise tests.TestSkipped('Uninitializable branch format')
103
103
 
 
104
    def make_branch_builder(self, relpath, format=None):
 
105
        if format is None:
 
106
            format = self.branch_format._matchingbzrdir
 
107
        return super(TestCaseWithBranch, self).make_branch_builder(
 
108
            relpath, format=format)
 
109
 
104
110
    def make_repository(self, relpath, shared=False, format=None):
105
111
        made_control = self.make_bzrdir(relpath, format=format)
106
112
        return made_control.create_repository(shared=shared)
184
190
    tests.adapt_modules(test_branch_implementations, adapter, loader, result)
185
191
 
186
192
    # Add RemoteBranch tests, which need a special server.
 
193
    remote_branch_format = RemoteBranchFormat()
187
194
    adapt_to_smart_server = BranchTestProviderAdapter(
188
195
        SmartTCPServer_for_testing,
189
196
        ReadonlySmartTCPServer_for_testing,
190
 
        [(RemoteBranchFormat(), RemoteBzrDirFormat())],
 
197
        [(remote_branch_format, remote_branch_format._matchingbzrdir)],
191
198
        MemoryServer,
192
199
        name_suffix='-default')
193
200
    tests.adapt_modules(test_branch_implementations,
200
207
    adapt_to_smart_server = BranchTestProviderAdapter(
201
208
        SmartTCPServer_for_testing_v2_only,
202
209
        ReadonlySmartTCPServer_for_testing_v2_only,
203
 
        [(RemoteBranchFormat(), RemoteBzrDirFormat())],
 
210
        [(remote_branch_format, remote_branch_format._matchingbzrdir)],
204
211
        MemoryServer,
205
212
        name_suffix='-v2')
206
213
    tests.adapt_modules(test_branch_implementations,