Charlie Proctor added the comment: Thanks for the feedback David!
I've posted a revised patch with more descriptive comments and the restoration code moved into addCleanup. As described in the comments, in the context of this test, the "main" thread is the one running the test suite... so rather than self.assertRaises(KeyboardInterrupt), I assert that appropriate SIGINTS are received. The lock is used to facilitate these assertions, since signals are asynchronous. ---------- Added file: http://bugs.python.org/file45351/test_interrupt_main.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19899> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com