/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/selftest.py

  • Committer: Martin Pool
  • Date: 2005-06-20 05:22:04 UTC
  • Revision ID: mbp@sourcefrog.net-20050620052204-c4253c3feb664088
- start moving external tests into the testsuite framework

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
 
import unittest
 
18
from unittest import TestResult, TestCase
19
19
 
20
 
class _MyResult(unittest.TestResult):
 
20
class _MyResult(TestResult):
21
21
#     def startTest(self, test):
22
22
#         print str(test).ljust(50),
23
 
#         unittest.TestResult.startTest(self, test)
 
23
#         TestResult.startTest(self, test)
24
24
 
25
25
#     def stopTest(self, test):
26
26
#         print
27
 
#         unittest.TestResult.stopTest(self, test)
 
27
#         TestResult.stopTest(self, test)
28
28
 
29
29
 
30
30
    pass
31
31
 
32
32
 
33
33
 
 
34
 
34
35
def selftest():
35
36
     from unittest import TestLoader, TestSuite
36
37
     import bzrlib
37
38
     import bzrlib.whitebox
 
39
     import bzrlib.blackbox
38
40
     from doctest import DocTestSuite
39
41
    
40
42
     suite = TestSuite()
41
 
 
42
 
     suite.addTest(TestLoader().loadTestsFromModule(bzrlib.whitebox))
43
 
    
 
43
     tl = TestLoader()
 
44
 
 
45
     for m in bzrlib.whitebox, bzrlib.blackbox:
 
46
         suite.addTest(tl.loadTestsFromModule(m))
 
47
 
44
48
     for m in bzrlib.store, bzrlib.inventory, bzrlib.branch, bzrlib.osutils, \
45
49
             bzrlib.commands:
46
50
         suite.addTest(DocTestSuite(m))