MCPcopy Index your code
hub / github.com/python/cpython / autorange

Method autorange

Lib/test/test_timeit.py:367–370  ·  view source on GitHub ↗
(self, seconds_per_increment=1/1024, callback=None, target_time=0.2)

Source from the content-addressed store, hash-verified

365 self.assert_exc_string(error_stringio.getvalue(), 'ZeroDivisionError')
366
367 def autorange(self, seconds_per_increment=1/1024, callback=None, target_time=0.2):
368 timer = FakeTimer(seconds_per_increment=seconds_per_increment)
369 t = timeit.Timer(stmt=self.fake_stmt, setup=self.fake_setup, timer=timer)
370 return t.autorange(callback, target_time=target_time)
371
372 def test_autorange(self):
373 num_loops, time_taken = self.autorange()

Callers 4

test_autorangeMethod · 0.95
test_autorange_secondMethod · 0.95

Calls 2

autorangeMethod · 0.95
FakeTimerClass · 0.85

Tested by

no test coverage detected