[Python-checkins] cpython (merge 3.3 -> default): Merge #18396 from 3.3
nick.coghlan
python-checkins at python.org
Sat Aug 3 15:03:43 CEST 2013
http://hg.python.org/cpython/rev/6fc71ed6a910
changeset: 84985:6fc71ed6a910
parent: 84983:dab7d6f33b87
parent: 84984:b7834800562f
user: Nick Coghlan <ncoghlan at gmail.com>
date: Sat Aug 03 23:03:27 2013 +1000
summary:
Merge #18396 from 3.3
files:
Lib/test/test_signal.py | 10 ++++++++--
Misc/NEWS | 3 +++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -206,11 +206,17 @@
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)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -599,6 +599,9 @@
Tests
-----
+- Issue #18396: Fix spurious test failure in test_signal on Windows when
+ faulthandler is enabled (Patch by Jeremy Kloth)
+
- Issue #17046: Fix broken test_executable_without_cwd in test_subprocess.
- Issue #15415: Add new temp_dir() and change_cwd() context managers to
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list