~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-06-06 10:12:26 UTC
  • mfrom: (1711.2.31 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060606101226-e51bd1a4f4eb493a
(jam) Fix timing tests to allow larger range of time.

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