15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
class _MyResult(unittest.TestResult):
21
# def startTest(self, test):
22
# print str(test).ljust(50),
23
# unittest.TestResult.startTest(self, test)
25
# def stopTest(self, test):
27
# unittest.TestResult.stopTest(self, test)
20
from unittest import TestLoader
22
from doctest import DocTestSuite
24
tr = unittest.TextTestRunner(verbosity=2)
25
suite = unittest.TestSuite()
26
import bzrlib.whitebox
28
suite.addTest(TestLoader().loadTestsFromModule(bzrlib.whitebox))
30
for m in bzrlib.store, bzrlib.inventory, bzrlib.branch, bzrlib.osutils, \
32
suite.addTest(DocTestSuite(m))
34
result = tr.run(suite)
35
return result.wasSuccessful()
35
from unittest import TestLoader, TestSuite
37
import bzrlib.whitebox
38
from doctest import DocTestSuite
42
suite.addTest(TestLoader().loadTestsFromModule(bzrlib.whitebox))
44
for m in bzrlib.store, bzrlib.inventory, bzrlib.branch, bzrlib.osutils, \
46
suite.addTest(DocTestSuite(m))
51
print '%4d tests run' % result.testsRun
52
print '%4d errors' % len(result.errors)
53
print '%4d failures' % len(result.failures)
55
return result.wasSuccessful()