~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Fix blackbox tests so they run again, and they load tests before loading the test suite, so you get proper errors.

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
27
 
from bzrlib.tests import TestCaseInTempDir, BzrTestBase
 
26
from bzrlib.tests import (TestLoader, TestSuite, _load_module_by_name,
 
27
                          TestCaseInTempDir, BzrTestBase)
28
28
 
29
29
def test_suite():
30
30
    testmod_names = [
47
47
                     'bzrlib.tests.blackbox.test_upgrade',
48
48
                     'bzrlib.tests.blackbox.test_versioning',
49
49
                     ]
50
 
    return TestLoader().loadTestsFromNames(testmod_names)
 
50
 
 
51
    suite = TestSuite()
 
52
    loader = TestLoader()
 
53
    for mod_name in testmod_names:
 
54
        mod = _load_module_by_name(mod_name)
 
55
        suite.addTest(loader.loadTestsFromModule(mod))
 
56
    return suite
51
57
 
52
58
 
53
59
class ExternalBase(TestCaseInTempDir):