summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-08-03 13:03:27 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2013-08-03 13:03:27 (GMT)
commit13371303351de5812c07d55dc29cacdef5cf1287 (patch)
treefcbc82a5b0710d78f84676d809fc755cbb27e482 /Lib
parent02515f7a3a2a5989d38b16ef687e50188ca5d164 (diff)
parent60b3ac7482aa7ca4e6f0f66792160d38b48d1914 (diff)
downloadcpython-13371303351de5812c07d55dc29cacdef5cf1287.zip
cpython-13371303351de5812c07d55dc29cacdef5cf1287.tar.gz
cpython-13371303351de5812c07d55dc29cacdef5cf1287.tar.bz2
Merge #18396 from 3.3
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_signal.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 24c2ac8..1efb5f7 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -206,11 +206,17 @@ class WindowsSignalTests(unittest.TestCase):
def test_issue9324(self):
# Updated for issue #10003, adding SIGBREAK
handler = lambda x, y: None
+ checked = set()
for sig in (signal.SIGABRT, signal.SIGBREAK, signal.SIGFPE,
signal.SIGILL, signal.SIGINT, signal.SIGSEGV,
signal.SIGTERM):
- # Set and then reset a handler for signals that work on windows
- signal.signal(sig, signal.signal(sig, handler))
+ # Set and then reset a handler for signals that work on windows.
+ # Issue #18396, only for signals without a C-level handler.
+ if signal.getsignal(sig) is not None:
+ signal.signal(sig, signal.signal(sig, handler))
+ checked.add(sig)
+ # Issue #18396: Ensure the above loop at least tested *something*
+ self.assertTrue(checked)
with self.assertRaises(ValueError):
signal.signal(-1, handler)