[issue20564] test_threadsignals.py "failed" on OpenBSD because too slow (> 3sec)

Charles-François Natali report at bugs.python.org
Sat Feb 8 20:36:55 CET 2014


Charles-François Natali added the comment:

> I'm asking why it's 3 seconds by default in the tests?
> Could we modify the value to 6 instead of 3, is it acceptable?

No, see this comment:
"""
  self.assertRaises(KeyboardInterrupt, lock.acquire, timeout=5)
  dt = time.time() - t1
  # Checking that KeyboardInterrupt was raised is not sufficient.
  # We want to assert that lock.acquire() was interrupted because
  # of the signal, not that the signal handler was called immediately
  # after timeout return of lock.acquire() (which can fool assertRaises).
"""

5s corresponds exactly to the timeout passed to acquire(), which means that it didn't get interrupted, which is precisely the goal of the test.

----------
nosy: +neologix

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


More information about the Python-bugs-list mailing list