~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Martin Pool
  • Date: 2005-07-11 07:25:42 UTC
  • Revision ID: mbp@sourcefrog.net-20050711072542-6b1917e90ffc20cf
- merge john's plugins-have-test_suite.patch:
 - plugins can provide tests
 - plugins command shows more useful information

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
def selftest():
24
24
    from unittest import TestLoader, TestSuite
25
25
    import bzrlib, bzrlib.store, bzrlib.inventory, bzrlib.branch
26
 
    import bzrlib.osutils, bzrlib.commands, bzrlib.merge3
 
26
    import bzrlib.osutils, bzrlib.commands, bzrlib.merge3, bzrlib.plugin
27
27
    global MODULES_TO_TEST, MODULES_TO_DOCTEST
28
28
 
29
29
    import bzrlib.selftest.whitebox
78
78
    for m in (MODULES_TO_DOCTEST):
79
79
        suite.addTest(DocTestSuite(m))
80
80
 
 
81
    for p in bzrlib.plugin.all_plugins:
 
82
        if hasattr(p, 'test_suite'):
 
83
            suite.addTest(p.test_suite())
 
84
 
81
85
    suite.addTest(unittest.makeSuite(bzrlib.merge_core.MergeTest, 'test_'))
82
86
 
83
87
    return run_suite(suite, 'testbzr')