~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-01-13 06:04:00 UTC
  • mto: (1685.1.1 bzr-encoding)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060113060400-e24615f222244238
Hooked up EncodingAdapter, and updated test_non_ascii.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
rather starts again from the run_bzr function.
24
24
"""
25
25
 
26
 
from bzrlib.tests import TestLoader, TestSuite, _load_module_by_name
27
 
from bzrlib.tests import TestCaseInTempDir, BzrTestBase
 
26
from bzrlib.tests import (TestLoader, TestSuite, _load_module_by_name,
 
27
                          TestCaseInTempDir, BzrTestBase,
 
28
                          iter_suite_tests)
 
29
from bzrlib.tests.EncodingAdapter import EncodingTestAdapter
28
30
 
29
31
def test_suite():
30
32
    testmod_names = [
34
36
                     'bzrlib.tests.blackbox.test_export',
35
37
                     'bzrlib.tests.blackbox.test_log',
36
38
                     'bzrlib.tests.blackbox.test_missing',
37
 
                     'bzrlib.tests.blackbox.test_non_ascii',
38
39
                     'bzrlib.tests.blackbox.test_pull',
39
40
                     'bzrlib.tests.blackbox.test_revno',
40
41
                     'bzrlib.tests.blackbox.test_revision_info',
42
43
                     'bzrlib.tests.blackbox.test_too_much',
43
44
                     'bzrlib.tests.blackbox.test_versioning',
44
45
                     ]
 
46
    test_encodings = [
 
47
        'bzrlib.tests.blackbox.test_non_ascii',
 
48
    ]
 
49
 
45
50
    suite = TestSuite()
46
51
    loader = TestLoader()
47
52
    for mod_name in testmod_names:
48
53
        mod = _load_module_by_name(mod_name)
49
54
        suite.addTest(loader.loadTestsFromModule(mod))
 
55
 
 
56
    adapter = EncodingTestAdapter()
 
57
    for mod_name in test_encodings:
 
58
        mod = _load_module_by_name(mod_name)
 
59
        for test in iter_suite_tests(loader.loadTestsFromModule(mod)):
 
60
            suite.addTests(adapter.adapt(test))
 
61
 
50
62
    return suite
51
63
 
52
64