~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Robert Collins
  • Date: 2005-08-24 05:51:34 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050824055134-708a7ee78516ecbc
remove TEST_CLASSES dead code and provide a bzrlib.test_suite() convenience method

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        
33
33
 
34
34
def selftest(verbose=False):
 
35
    return run_suite(test_suite(), 'testbzr', verbose=verbose)
 
36
 
 
37
 
 
38
def test_suite():
35
39
    from unittest import TestLoader, TestSuite
36
40
    import bzrlib, bzrlib.store, bzrlib.inventory, bzrlib.branch
37
41
    import bzrlib.osutils, bzrlib.commands, bzrlib.merge3, bzrlib.plugin
68
72
        if m not in MODULES_TO_DOCTEST:
69
73
            MODULES_TO_DOCTEST.append(m)
70
74
 
71
 
    
72
75
    TestCase.BZRPATH = os.path.join(os.path.realpath(os.path.dirname(bzrlib.__path__[0])), 'bzr')
73
76
    print '%-30s %s' % ('bzr binary', TestCase.BZRPATH)
74
 
 
75
77
    print
76
 
 
77
78
    suite = TestSuite()
78
 
 
79
79
    suite.addTest(TestLoader().loadTestsFromNames(testmod_names))
80
 
 
81
80
    for m in MODULES_TO_TEST:
82
81
         suite.addTest(TestLoader().loadTestsFromModule(m))
83
 
 
84
82
    for m in (MODULES_TO_DOCTEST):
85
83
        suite.addTest(DocTestSuite(m))
86
 
 
87
84
    for p in bzrlib.plugin.all_plugins:
88
85
        if hasattr(p, 'test_suite'):
89
86
            suite.addTest(p.test_suite())
90
 
 
91
87
    import bzrlib.merge_core
92
88
    suite.addTest(unittest.makeSuite(bzrlib.merge_core.MergeTest, 'test_'))
93
 
 
94
 
    return run_suite(suite, 'testbzr', verbose=verbose)
95
 
 
96
 
 
 
89
    return suite
97
90