Commit Graph

6 Commits

Author SHA1 Message Date
Robert Collins 302dbc6792 Issue #18983: Allow selection of output units in timeit.
This allows manual selection of a specific unit such as usecs rather than the
use of a heuristic. This is intended to aid machine processing of timeit
output.

Patch by Serhiy Storchaka.
2015-03-18 09:54:50 +13:00
Serhiy Storchaka c959b0cd30 Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
2015-01-26 12:09:59 +02:00
Serhiy Storchaka 2bef58577f Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
2015-01-26 12:09:17 +02:00
Antoine Pitrou ef3b9ed0ac Issue #2527: Add a *globals* argument to timeit functions, in order to override the globals namespace in which the timed code is executed.
Patch by Ben Roberts.
2014-08-22 23:13:50 -04:00
Benjamin Peterson a5c4090394 skip if __doc__ is gone 2012-10-12 11:44:19 -04:00
R David Murray a88da67bcb #11578: add unit tests for timeit module.
Patch by Michael Henry.
2011-03-16 17:32:27 -04:00