[issue20336] test_asyncio: relax timings even more

STINNER Victor report at bugs.python.org
Thu Jan 23 11:53:01 CET 2014


STINNER Victor added the comment:

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)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20336>
_______________________________________


More information about the Python-bugs-list mailing list