~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-19 06:58:55 UTC
  • mfrom: (2196.1.2 benchmark-formatting)
  • Revision ID: pqm@pqm.ubuntu.com-20061219065855-deb1b86e0b392f15
(mbp) fix line width and abbreviation in benchmark progress (trivial)

Show diffs side-by-side

added added

removed removed

Lines of Context:
585
585
        result.extractBenchmarkTime(self)
586
586
        timed_string = result._testTimeString()
587
587
        # without explicit benchmarking, we should get a simple time.
588
 
        self.assertContainsRe(timed_string, "^         [ 1-9][0-9]ms$")
 
588
        self.assertContainsRe(timed_string, "^ *[ 1-9][0-9]ms$")
589
589
        # if a benchmark time is given, we want a x of y style result.
590
590
        self.time(time.sleep, 0.001)
591
591
        result.extractBenchmarkTime(self)
592
592
        timed_string = result._testTimeString()
593
 
        self.assertContainsRe(timed_string, "^   [ 1-9][0-9]ms/   [ 1-9][0-9]ms$")
 
593
        self.assertContainsRe(timed_string, "^ *[ 1-9][0-9]ms/ *[ 1-9][0-9]ms$")
594
594
        # extracting the time from a non-bzrlib testcase sets to None
595
595
        result._recordTestStartTime()
596
596
        result.extractBenchmarkTime(
597
597
            unittest.FunctionTestCase(self.test_elapsed_time_with_benchmarking))
598
598
        timed_string = result._testTimeString()
599
 
        self.assertContainsRe(timed_string, "^         [ 1-9][0-9]ms$")
 
599
        self.assertContainsRe(timed_string, "^ *[ 1-9][0-9]ms$")
600
600
        # cheat. Yes, wash thy mouth out with soap.
601
601
        self._benchtime = None
602
602