~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

Make the test test_time_creates_benchmark_in_result more robust to timing variation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
555
555
 
556
556
    def method_that_times_a_bit_twice(self):
557
557
        # call self.time twice to ensure it aggregates
558
 
        self.time(time.sleep, 0.005)
559
 
        self.time(time.sleep, 0.005)
 
558
        self.time(time.sleep, 0.007)
 
559
        self.time(time.sleep, 0.007)
560
560
 
561
561
    def test_time_creates_benchmark_in_result(self):
562
562
        """Test that the TestCase.time() method accumulates a benchmark time."""