/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

Merge bzr.dev r3466

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                          adapt_modules,
30
30
                          default_transport,
31
31
                          TestCaseWithTransport,
32
 
                          TestLoader,
33
32
                          TestScenarioApplier,
34
 
                          TestSuite,
35
33
                          )
36
34
from bzrlib.transport.memory import MemoryServer
37
35
 
86
84
        return self.bzrdir
87
85
 
88
86
    def make_bzrdir(self, relpath, format=None):
 
87
        if format is None:
 
88
            format = self.bzrdir_format
89
89
        return super(TestCaseWithBzrDir, self).make_bzrdir(
90
 
            relpath, format=self.bzrdir_format)
91
 
 
92
 
 
93
 
def test_suite():
94
 
    result = TestSuite()
 
90
            relpath, format=format)
 
91
 
 
92
 
 
93
def load_tests(basic_tests, module, loader):
 
94
    result = loader.suiteClass()
 
95
    # add the tests for this module
 
96
    result.addTests(basic_tests)
 
97
 
95
98
    test_bzrdir_implementations = [
96
99
        'bzrlib.tests.bzrdir_implementations.test_bzrdir',
97
100
        ]
103
106
        # by the TestCaseWithTransport.get_readonly_transport method.
104
107
        None,
105
108
        formats)
106
 
    loader = TestLoader()
 
109
    # add the tests for the sub modules
107
110
    adapt_modules(test_bzrdir_implementations, adapter, loader, result)
108
111
 
109
112
    # This will always add the tests for smart server transport, regardless of
110
113
    # the --transport option the user specified to 'bzr selftest'.
111
 
    from bzrlib.smart.server import SmartTCPServer_for_testing, ReadonlySmartTCPServer_for_testing
 
114
    from bzrlib.smart.server import (
 
115
        SmartTCPServer_for_testing,
 
116
        ReadonlySmartTCPServer_for_testing,
 
117
        )
112
118
    from bzrlib.remote import RemoteBzrDirFormat
113
119
 
114
120
    # test the remote server behaviour using a MemoryTransport
115
 
    smart_server_suite = TestSuite()
 
121
    smart_server_suite = loader.suiteClass()
116
122
    adapt_to_smart_server = BzrDirTestProviderAdapter(
117
123
        MemoryServer,
118
124
        SmartTCPServer_for_testing,
120
126
        [(RemoteBzrDirFormat())])
121
127
    adapt_modules(test_bzrdir_implementations,
122
128
                  adapt_to_smart_server,
123
 
                  TestLoader(),
 
129
                  loader,
124
130
                  smart_server_suite)
125
131
    result.addTests(smart_server_suite)
126
132