[New-bugs-announce] [issue15505] unittest.installHandler incorrectly assumes SIGINT handler is set.

Thomas Wouters report at bugs.python.org
Mon Jul 30 18:37:02 CEST 2012


New submission from Thomas Wouters:

unittest.installHandler incorrectly assumes signal.SIGINT will always be set to a callable object, rather than signal.SIG_DFL or signal.SIG_IGN. This breaks if the test is being executed in an environment that e.g. ignores signal.SIGINT, like a bash script that executes 'make' in a subshell, because an attempt to call the original handler (for whatever reason) causes it to try and call an integer.

On top of that, the *tests* for unittest.installHandler in unittest/tests/test_break.py assume not just that signal.SIGINT is set to a callable object, but that they're set to signal.default_int_handler.

----------
components: Tests
messages: 166910
nosy: twouters
priority: normal
severity: normal
status: open
title: unittest.installHandler incorrectly assumes SIGINT handler is set.
type: crash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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


More information about the New-bugs-announce mailing list