~abentley/bzr/revert

« back to all changes in this revision

Viewing changes to testsweet.py

merge merge tweaks from aaron, which includes latest .dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    """Indicates that a test was intentionally skipped, rather than failing."""
56
56
    # XXX: Not used yet
57
57
 
58
 
 
59
58
class EarlyStoppingTestResultAdapter(object):
60
59
    """An adapter for TestResult to stop at the first first failure or error"""
61
60
 
89
88
    def startTest(self, test):
90
89
        unittest.TestResult.startTest(self, test)
91
90
        # TODO: Maybe show test.shortDescription somewhere?
92
 
        what = test.id()
93
 
        # python2.3 has the bad habit of just "runit" for doctests
94
 
        if what == 'runit':
95
 
            what = test.shortDescription()
 
91
        what = test.shortDescription() or test.id()        
96
92
        if self.showAll:
97
 
            self.stream.write('%-60.60s' % what)
 
93
            self.stream.write('%-70.70s' % what)
98
94
        self.stream.flush()
99
95
 
100
96
    def addError(self, test, err):