~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
458
458
        self.time(time.sleep, 0.001)
459
459
        result.extractBenchmarkTime(self)
460
460
        timed_string = result._testTimeString()
461
 
        self.assertContainsRe(timed_string, "^    [0-9]ms/   [ 1-9][0-9]ms$")
 
461
        self.assertContainsRe(timed_string, "^   [ 1-9][0-9]ms/   [ 1-9][0-9]ms$")
462
462
        # extracting the time from a non-bzrlib testcase sets to None
463
463
        result._recordTestStartTime()
464
464
        result.extractBenchmarkTime(
465
465
            unittest.FunctionTestCase(self.test_elapsed_time_with_benchmarking))
466
466
        timed_string = result._testTimeString()
467
 
        self.assertContainsRe(timed_string, "^          [0-9]ms$")
 
467
        self.assertContainsRe(timed_string, "^         [ 1-9][0-9]ms$")
468
468
        # cheat. Yes, wash thy mouth out with soap.
469
469
        self._benchtime = None
470
470