[issue20910] Make sleep configurable in tests
STINNER Victor
report at bugs.python.org
Thu Mar 13 14:33:24 CET 2014
STINNER Victor added the comment:
The test suite pass with test_sleep.patch applied on my fast Linux PC.
The test must be tested on Windows (because of the clock resolution of 15.6 ms).
I run the unit test using the command "./python -m test -j0 -rW".
By the way, do you have an idea to simulate a very slow buildbot?
Incomplete list of tests which fail with a sleep of 1 nanosecond:
test_asyncore
test_socket
test_wait4
test_faulthandler
test_time
test_threading
test_wait3
test_fork1
I didn't check if it's a bug in the test or not. But at least, this one looks like a bug in the test: sleep(0.5) takes *at least* 0.5 seconds, max_dt should be bigger (maybe 0.6 ? or at least 0.5001).
======================================================================
FAIL: test_monotonic (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/haypo/prog/python/default/Lib/test/test_time.py", line 397, in test_monotonic
support.check_time_delta(0.5, dt, 0.5, clock='monotonic')
File "/home/haypo/prog/python/default/Lib/test/support/__init__.py", line 2241, in check_time_delta
message))
AssertionError: timing 500.4 ms seconds > max timing 500.0 ms seconds; the clock 'monotonic' has a resolution of 1.0 ns; tolerate 1.0 ns seconds
See also Nick's PEP:
"Core development workflow automation for CPython"
http://legacy.python.org/dev/peps/pep-0462/
----------
nosy: +ncoghlan, pitrou, serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20910>
_______________________________________
More information about the Python-bugs-list
mailing list