Message208912
Tests failing because of timings is really annoying. It would be nice to add something in test.support to configure timings. A function can maybe wait until the system load is lower than a threshold, or we should add a parameter to configure a tolerance between the perfect timing and the expected timing.
The tolerance can be a simple factor, a floating point number >= 1.0.
For example, replace:
0.09 <= t1-t0 <= 0.9, t1-t0
with
0.1 - 0.01 * factor <= t1-t0 <= 0.1 + 0.8 * factor
or a new test function:
check_timing(t1-t0, 0.1, 0.01, 0.8) |
|
Date |
User |
Action |
Args |
2014-01-23 10:53:01 | vstinner | set | recipients:
+ vstinner, jcea, skrah |
2014-01-23 10:53:01 | vstinner | set | messageid: <1390474381.79.0.751112290109.issue20336@psf.upfronthosting.co.za> |
2014-01-23 10:53:01 | vstinner | link | issue20336 messages |
2014-01-23 10:53:01 | vstinner | create | |
|