/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/tests/__init__.py

  • Committer: Martin Pool
  • Date: 2009-08-03 05:19:50 UTC
  • mto: This revision was merged to the branch mainline in revision 4584.
  • Revision ID: mbp@sourcefrog.net-20090803051950-u7aqedxdn39x26o1
TextTestResult now clears off the pb when the tests are done

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
                 ):
386
386
        ExtendedTestResult.__init__(self, stream, descriptions, verbosity,
387
387
            bench_history, num_tests, strict)
388
 
        if pb is None:
389
 
            self.pb = self.ui.nested_progress_bar()
390
 
            self._supplied_pb = False
391
 
        else:
392
 
            self.pb = pb
393
 
            self._supplied_pb = True
 
388
        # We no longer pass them around, but just rely on the UIFactory stack
 
389
        # for state
 
390
        if pb is not None:
 
391
            warnings.warn("Passing pb to TextTestResult is deprecated")
 
392
        self.pb = self.ui.nested_progress_bar()
394
393
        self.pb.show_pct = False
395
394
        self.pb.show_spinner = False
396
395
        self.pb.show_eta = False,
465
464
    def report_cleaning_up(self):
466
465
        self.pb.update('Cleaning up')
467
466
 
 
467
    def printErrors(self):
 
468
        # clear the pb to make room for the error listing
 
469
        self.pb.clear()
 
470
        super(TextTestResult, self).printErrors()
 
471
 
468
472
    def finished(self):
469
 
        if not self._supplied_pb:
470
 
            self.pb.finished()
 
473
        self.pb.finished()
471
474
 
472
475
 
473
476
class VerboseTestResult(ExtendedTestResult):