~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Aaron Bentley
  • Date: 2005-08-10 21:43:27 UTC
  • mto: (1092.1.41) (1185.3.4) (974.1.47)
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: abentley@panoramicfeedback.com-20050810214327-4e8c22e4cba24527
Eliminated ThreeWayInventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
MODULES_TO_TEST = []
21
21
MODULES_TO_DOCTEST = []
22
22
 
23
 
def selftest():
 
23
def selftest(verbose=False):
24
24
    from unittest import TestLoader, TestSuite
25
25
    import bzrlib, bzrlib.store, bzrlib.inventory, bzrlib.branch
26
26
    import bzrlib.osutils, bzrlib.commands, bzrlib.merge3, bzrlib.plugin
34
34
    import bzrlib.selftest.testrevisionnamespaces
35
35
    import bzrlib.selftest.testbranch
36
36
    import bzrlib.selftest.teststatus
 
37
    import bzrlib.selftest.testinv
 
38
    import bzrlib.selftest.testdiff
37
39
    import bzrlib.merge_core
38
40
    from doctest import DocTestSuite
39
41
    import os
46
48
              bzrlib.osutils, bzrlib.commands, bzrlib.merge3):
47
49
        if m not in MODULES_TO_DOCTEST:
48
50
            MODULES_TO_DOCTEST.append(m)
49
 
            
 
51
    
 
52
    # ugly ugly!
50
53
    for m in (bzrlib.selftest.whitebox,
51
54
              bzrlib.selftest.versioning,
 
55
              bzrlib.selftest.testinv,
52
56
              bzrlib.selftest.testmerge3,
53
57
              bzrlib.selftest.testhashcache,
54
58
              bzrlib.selftest.teststatus,
56
60
              bzrlib.selftest.testhashcache,
57
61
              bzrlib.selftest.testrevisionnamespaces,
58
62
              bzrlib.selftest.testbranch,
 
63
              bzrlib.selftest.testdiff,
59
64
              ):
60
65
        if m not in MODULES_TO_TEST:
61
66
            MODULES_TO_TEST.append(m)
68
73
 
69
74
    suite = TestSuite()
70
75
 
71
 
    # should also test bzrlib.merge_core, but they seem to be out of date with
72
 
    # the code.
73
 
 
74
 
 
75
 
    # XXX: python2.3's TestLoader() doesn't seem to find all the
76
 
    # tests; don't know why
77
76
    for m in MODULES_TO_TEST:
78
77
         suite.addTest(TestLoader().loadTestsFromModule(m))
79
78
 
86
85
 
87
86
    suite.addTest(unittest.makeSuite(bzrlib.merge_core.MergeTest, 'test_'))
88
87
 
89
 
    return run_suite(suite, 'testbzr')
 
88
    return run_suite(suite, 'testbzr', verbose=verbose)
90
89
 
91
90
 
92
91