[issue1040026] os.times() is bogus

Malte Helmert report at bugs.python.org
Sat Feb 23 17:26:15 CET 2008


Malte Helmert added the comment:

Here is a patch that adds a test case to test_posix.py. This is ignored
on Windows, as it requires fork.

There is a trade-off: If WAIT_TIME isn't large enough, small
irregularities in the process scheduler might cause this to fail. If it
is too large, the unit tests will take long for everyone.

Currently, WAIT_TIME is 0.1 seconds and the tolerance in the assertion
is about 5%, which works well for me. Not sure how this behaves on very
busy machines.

Added file: http://bugs.python.org/file9506/test_posix.PATCH

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1040026>
_____________________________________


More information about the Python-bugs-list mailing list