Message280050
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? |
|
Date |
User |
Action |
Args |
2016-11-04 15:07:30 | r.david.murray | set | recipients:
+ r.david.murray, christian.heimes, charlie.proctor |
2016-11-04 15:07:30 | r.david.murray | set | messageid: <1478272050.64.0.466213639478.issue19899@psf.upfronthosting.co.za> |
2016-11-04 15:07:30 | r.david.murray | link | issue19899 messages |
2016-11-04 15:07:30 | r.david.murray | create | |
|