~bzr/bzr/bzr.1.5

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-08 23:03:13 UTC
  • mfrom: (3394.3.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20080508230313-knn3ibom6wt27w5k
(vila) Make the test suite use the new test loader

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.tests import (
28
28
                          adapt_modules,
29
29
                          TestCaseWithTransport,
30
 
                          TestSuite,
31
 
                          TestLoader,
32
30
                          iter_suite_tests,
33
31
                          )
34
32
from bzrlib.tests.EncodingAdapter import EncodingTestAdapter
38
36
import bzrlib.ui as ui
39
37
 
40
38
 
41
 
def test_suite():
 
39
def load_tests(basic_tests, module, loader):
 
40
    suite = loader.suiteClass()
 
41
    # add the tests for this module
 
42
    suite.addTests(basic_tests)
 
43
 
42
44
    testmod_names = [
43
45
                     'bzrlib.tests.blackbox.test_add',
44
46
                     'bzrlib.tests.blackbox.test_added',
114
116
                     'bzrlib.tests.blackbox.test_versioning',
115
117
                     'bzrlib.tests.blackbox.test_whoami',
116
118
                     ]
 
119
    # add the tests for the sub modules
 
120
    suite.addTests(loader.loadTestsFromModuleNames(testmod_names))
 
121
 
117
122
    test_encodings = [
118
123
        'bzrlib.tests.blackbox.test_non_ascii',
119
124
    ]
120
125
 
121
 
    loader = TestLoader()
122
 
    suite = loader.loadTestsFromModuleNames(testmod_names) 
123
 
 
124
126
    adapter = EncodingTestAdapter()
125
127
    adapt_modules(test_encodings, adapter, loader, suite)
126
128