33
33
from unittest import TestLoader, TestSuite
34
34
import bzrlib, bzrlib.store, bzrlib.inventory, bzrlib.branch
35
35
import bzrlib.osutils, bzrlib.commands, bzrlib.merge3, bzrlib.plugin
36
global MODULES_TO_TEST, MODULES_TO_DOCTEST
38
import bzrlib.selftest.whitebox
39
import bzrlib.selftest.blackbox
40
import bzrlib.selftest.versioning
41
import bzrlib.selftest.testmerge3
42
import bzrlib.selftest.testhashcache
43
import bzrlib.selftest.testrevisionnamespaces
44
import bzrlib.selftest.testbranch
45
import bzrlib.selftest.teststatus
46
import bzrlib.selftest.testinv
47
import bzrlib.merge_core
48
36
from doctest import DocTestSuite
43
global MODULES_TO_TEST, MODULES_TO_DOCTEST
46
['bzrlib.selftest.whitebox',
47
'bzrlib.selftest.versioning',
48
'bzrlib.selftest.testinv',
49
'bzrlib.selftest.testmerge3',
50
'bzrlib.selftest.testhashcache',
51
'bzrlib.selftest.teststatus',
52
'bzrlib.selftest.blackbox',
53
'bzrlib.selftest.testrevisionnamespaces',
54
'bzrlib.selftest.testbranch',
57
# XXX: should also test bzrlib.merge_core, but they seem to be out
58
# of date with the code.
55
60
for m in (bzrlib.store, bzrlib.inventory, bzrlib.branch,
56
61
bzrlib.osutils, bzrlib.commands, bzrlib.merge3):
57
62
if m not in MODULES_TO_DOCTEST:
58
63
MODULES_TO_DOCTEST.append(m)
61
for m in (bzrlib.selftest.whitebox,
62
bzrlib.selftest.versioning,
63
bzrlib.selftest.testinv,
64
bzrlib.selftest.testmerge3,
65
bzrlib.selftest.testhashcache,
66
bzrlib.selftest.teststatus,
67
bzrlib.selftest.blackbox,
68
bzrlib.selftest.testhashcache,
69
bzrlib.selftest.testrevisionnamespaces,
70
bzrlib.selftest.testbranch,
72
if m not in MODULES_TO_TEST:
73
MODULES_TO_TEST.append(m)
76
66
TestBase.BZRPATH = os.path.join(os.path.realpath(os.path.dirname(bzrlib.__path__[0])), 'bzr')
77
67
print '%-30s %s' % ('bzr binary', TestBase.BZRPATH)
81
71
suite = TestSuite()
83
# should also test bzrlib.merge_core, but they seem to be out of date with
87
# XXX: python2.3's TestLoader() doesn't seem to find all the
88
# tests; don't know why
73
suite.addTest(TestLoader().loadTestsFromNames(testmod_names))
89
75
for m in MODULES_TO_TEST:
90
76
suite.addTest(TestLoader().loadTestsFromModule(m))
96
82
if hasattr(p, 'test_suite'):
97
83
suite.addTest(p.test_suite())
85
import bzrlib.merge_core
99
86
suite.addTest(unittest.makeSuite(bzrlib.merge_core.MergeTest, 'test_'))
101
88
return run_suite(suite, 'testbzr', verbose=verbose)