~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-06 05:24:29 UTC
  • Revision ID: mbp@sourcefrog.net-20050706052429-2b1f11b4fc99a62f
- workaround for flaky TestLoader in python2.3
  
  Now we just list all the test classes manually -- a bit of a pain, but does
  mean we can run the simpler tests first.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    print
40
40
 
41
41
    suite = TestSuite()
42
 
    tl = TestLoader()
43
42
 
44
43
    # should also test bzrlib.merge_core, but they seem to be out of date with
45
44
    # the code.
46
45
 
47
 
    for m in bzrlib.selftest.whitebox, \
48
 
            bzrlib.selftest.versioning, \
49
 
            bzrlib.selftest.testmerge3:
50
 
        suite.addTest(tl.loadTestsFromModule(m))
51
 
 
52
 
    for m in bzrlib.store, bzrlib.inventory, bzrlib.branch, bzrlib.osutils, \
53
 
            bzrlib.commands, \
54
 
            bzrlib.merge3:
 
46
 
 
47
    # python2.3's TestLoader() doesn't seem to work well; don't know why
 
48
 
 
49
    for m in (bzrlib.store,
 
50
              bzrlib.inventory,
 
51
              bzrlib.branch,
 
52
              bzrlib.osutils, 
 
53
              bzrlib.commands, 
 
54
              bzrlib.merge3):
55
55
        suite.addTest(DocTestSuite(m))
56
56
 
57
 
    suite.addTest(bzrlib.selftest.blackbox.suite())
 
57
    for cl in (bzrlib.selftest.whitebox.TEST_CLASSES 
 
58
               + bzrlib.selftest.versioning.TEST_CLASSES
 
59
               + bzrlib.selftest.testmerge3.TEST_CLASSES
 
60
               + bzrlib.selftest.blackbox.TEST_CLASSES):
 
61
        suite.addTest(cl())
58
62
 
59
63
    return run_suite(suite)
60
64