~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-07 04:44:56 UTC
  • mfrom: (3297.1.3 test-progress)
  • Revision ID: pqm@pqm.ubuntu.com-20080407044456-s1a9orh0kssphdh9
(mbp) more compact test progress counter

Show diffs side-by-side

added added

removed removed

Lines of Context:
402
402
        self.pb.update('[test 0/%d] starting...' % (self.num_tests))
403
403
 
404
404
    def _progress_prefix_text(self):
405
 
        a = '[%d' % self.count
 
405
        # the longer this text, the less space we have to show the test
 
406
        # name...
 
407
        a = '[%d' % self.count              # total that have been run
 
408
        # tests skipped as known not to be relevant are not important enough
 
409
        # to show here
 
410
        ## if self.skip_count:
 
411
        ##     a += ', %d skip' % self.skip_count
 
412
        ## if self.known_failure_count:
 
413
        ##     a += '+%dX' % self.known_failure_count
406
414
        if self.num_tests is not None:
407
415
            a +='/%d' % self.num_tests
408
 
        a += ' in %ds' % (time.time() - self._overall_start_time)
 
416
        a += ' in '
 
417
        runtime = time.time() - self._overall_start_time
 
418
        if runtime >= 60:
 
419
            a += '%dm%ds' % (runtime / 60, runtime % 60)
 
420
        else:
 
421
            a += '%ds' % runtime
409
422
        if self.error_count:
410
 
            a += ', %d errors' % self.error_count
 
423
            a += ', %d err' % self.error_count
411
424
        if self.failure_count:
412
 
            a += ', %d failed' % self.failure_count
413
 
        if self.known_failure_count:
414
 
            a += ', %d known failures' % self.known_failure_count
415
 
        if self.skip_count:
416
 
            a += ', %d skipped' % self.skip_count
 
425
            a += ', %d fail' % self.failure_count
417
426
        if self.unsupported:
418
 
            a += ', %d missing features' % len(self.unsupported)
 
427
            a += ', %d missing' % len(self.unsupported)
419
428
        a += ']'
420
429
        return a
421
430