/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/test_selftest.py

  • Committer: Vincent Ladeuil
  • Date: 2009-07-10 10:46:00 UTC
  • mto: (4525.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4526.
  • Revision ID: v.ladeuil+lp@free.fr-20090710104600-81t8scvfiqlrnwaq
Fixed as asked in review.

* bzrlib/tests/per_workingtree/__init__.py:
(load_tests):  Remove common prefix.

* bzrlib/tests/per_tree/__init__.py:
(load_tests):  Remove common prefix.

* bzrlib/tests/per_branch/__init__.py:
(load_tests): Remove common prefix.

* bzrlib/tests/__init__.py:
(test_suite): Restore module names sorting.

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.per_transport \
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.per_transport \
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.per_transport \
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)
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.per_interrepository 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.per_workingtree \
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(),
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.per_transport.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