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 r.david.murray
Recipients charlie.proctor, christian.heimes, r.david.murray
Date 2016-11-04.15:07:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478272050.64.0.466213639478.issue19899@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks, Charlie.

You should use addCleanup to handle the resetting of the state, so that it gets cleaned up no matter what happens in the test.  IMO the comments should either be omitted or be more descriptive about what exactly is being tested.  For example "If this timer goes off, then interrupt_main did not work, so fail the test".

I don't really understand what exactly is being tested in the body...it looks like two tests, one for calling it from the main thread (I suppose it makes sense to test that, but I don't know what behavior is expedted) and one from a subthread, which I would think was the real test.  I would expect the main thread to be catching KeyboardInterrupt, based on the description of interrupt_main, so I'm not even sure what the sigalrm is for.  Can you explain?
History
Date User Action Args
2016-11-04 15:07:30r.david.murraysetrecipients: + r.david.murray, christian.heimes, charlie.proctor
2016-11-04 15:07:30r.david.murraysetmessageid: <1478272050.64.0.466213639478.issue19899@psf.upfronthosting.co.za>
2016-11-04 15:07:30r.david.murraylinkissue19899 messages
2016-11-04 15:07:30r.david.murraycreate