~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-10 14:00:21 UTC
  • mfrom: (4525.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090710140021-2kq4yhui3de6mwt7
(mbp, vila) Finish the *_implementation to per_* test renaming

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
            def get_test_permutations(self):
121
121
                return sample_permutation
122
122
        sample_permutation = [(1,2), (3,4)]
123
 
        from bzrlib.tests.test_transport_implementations \
124
 
            import get_transport_test_permutations
 
123
        from bzrlib.tests.per_transport import get_transport_test_permutations
125
124
        self.assertEqual(sample_permutation,
126
125
                         get_transport_test_permutations(MockModule()))
127
126
 
130
129
        # as there are in all the registered transport modules - we assume if
131
130
        # this matches its probably doing the right thing especially in
132
131
        # combination with the tests for setting the right classes below.
133
 
        from bzrlib.tests.test_transport_implementations \
134
 
            import transport_test_permutations
 
132
        from bzrlib.tests.per_transport import transport_test_permutations
135
133
        from bzrlib.transport import _get_transport_modules
136
134
        modules = _get_transport_modules()
137
135
        permutation_count = 0
149
147
        # This test used to know about all the possible transports and the
150
148
        # order they were returned but that seems overly brittle (mbp
151
149
        # 20060307)
152
 
        from bzrlib.tests.test_transport_implementations \
153
 
            import transport_test_permutations
 
150
        from bzrlib.tests.per_transport import transport_test_permutations
154
151
        scenarios = transport_test_permutations()
155
152
        # there are at least that many builtin transports
156
153
        self.assertTrue(len(scenarios) > 6)
167
164
    def test_scenarios(self):
168
165
        # check that constructor parameters are passed through to the adapted
169
166
        # test.
170
 
        from bzrlib.tests.branch_implementations import make_scenarios
 
167
        from bzrlib.tests.per_branch import make_scenarios
171
168
        server1 = "a"
172
169
        server2 = "b"
173
170
        formats = [("c", "C"), ("d", "D")]
192
189
    def test_scenarios(self):
193
190
        # check that constructor parameters are passed through to the adapted
194
191
        # test.
195
 
        from bzrlib.tests.bzrdir_implementations import make_scenarios
 
192
        from bzrlib.tests.per_bzrdir import make_scenarios
196
193
        vfs_factory = "v"
197
194
        server1 = "a"
198
195
        server2 = "b"
293
290
    def test_scenarios(self):
294
291
        # check that constructor parameters are passed through to the adapted
295
292
        # test.
296
 
        from bzrlib.tests.interrepository_implementations import \
297
 
            make_scenarios
 
293
        from bzrlib.tests.per_interrepository import make_scenarios
298
294
        server1 = "a"
299
295
        server2 = "b"
300
296
        formats = [(str, "C1", "C2"), (int, "D1", "D2")]
320
316
    def test_scenarios(self):
321
317
        # check that constructor parameters are passed through to the adapted
322
318
        # test.
323
 
        from bzrlib.tests.workingtree_implementations \
324
 
            import make_scenarios
 
319
        from bzrlib.tests.per_workingtree import make_scenarios
325
320
        server1 = "a"
326
321
        server2 = "b"
327
322
        formats = [workingtree.WorkingTreeFormat2(),
351
346
        # workingtree_to_test_tree attribute set to 'return_parameter' and the
352
347
        # revision one set to revision_tree_from_workingtree.
353
348
 
354
 
        from bzrlib.tests.tree_implementations import (
 
349
        from bzrlib.tests.per_tree import (
355
350
            _dirstate_tree_from_workingtree,
356
351
            make_scenarios,
357
352
            preview_tree_pre,
433
428
        # unlike the TestProviderAdapter we dont want to automatically add a
434
429
        # parameterized one for WorkingTree - the optimisers will tell us what
435
430
        # ones to add.
436
 
        from bzrlib.tests.tree_implementations import (
 
431
        from bzrlib.tests.per_tree import (
437
432
            return_parameter,
438
433
            revision_tree_from_workingtree
439
434
            )
440
 
        from bzrlib.tests.intertree_implementations import (
 
435
        from bzrlib.tests.per_intertree import (
441
436
            make_scenarios,
442
437
            )
443
438
        from bzrlib.workingtree import WorkingTreeFormat2, WorkingTreeFormat3
2203
2198
        test_list = [
2204
2199
            # testmod_names
2205
2200
            'bzrlib.tests.blackbox.test_branch.TestBranch.test_branch',
 
2201
            ('bzrlib.tests.per_transport.TransportTests'
 
2202
             '.test_abspath(LocalURLServer)'),
2206
2203
            'bzrlib.tests.test_selftest.TestTestSuite.test_test_suite',
2207
 
            # transport implementations
2208
 
            'bzrlib.tests.test_transport_implementations.TransportTests'
2209
 
            '.test_abspath(LocalURLServer)',
2210
2204
            # modules_to_doctest
2211
2205
            'bzrlib.timestamp.format_highres_date',
2212
2206
            # plugins can't be tested that way since selftest may be run with