This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients neologix, rpointel
Date 2014-02-08.19:36:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391888215.2.0.157372252373.issue20564@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-02-08 19:36:55neologixsetrecipients: + neologix, rpointel
2014-02-08 19:36:55neologixsetmessageid: <1391888215.2.0.157372252373.issue20564@psf.upfronthosting.co.za>
2014-02-08 19:36:55neologixlinkissue20564 messages
2014-02-08 19:36:54neologixcreate