diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-10-01 15:09:53 (GMT) |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-10-01 15:09:53 (GMT) |
commit | eccd4d910dc61d5ad8ccc9c62d3ab823b359aa9d (patch) | |
tree | b99aca8e429e6dcbeac85dc51b7a6894f4826a0b /Lib/test/test_signal.py | |
parent | 0b441dad464050a1f0e9fb6a84ffb97bd52f1f1e (diff) | |
download | cpython-eccd4d910dc61d5ad8ccc9c62d3ab823b359aa9d.zip cpython-eccd4d910dc61d5ad8ccc9c62d3ab823b359aa9d.tar.gz cpython-eccd4d910dc61d5ad8ccc9c62d3ab823b359aa9d.tar.bz2 |
Merged revisions 85140 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85140 | brian.curtin | 2010-10-01 09:49:24 -0500 (Fri, 01 Oct 2010) | 4 lines
Fix #10003. Add SIGBREAK to the set of valid signals on Windows.
This fixes a regression noticed by bzr, introduced by issue #9324.
........
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r-- | Lib/test/test_signal.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 7aa03ef..1f15ff7 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -212,13 +212,13 @@ class BasicSignalTests(unittest.TestCase): @unittest.skipUnless(sys.platform == "win32", "Windows specific") class WindowsSignalTests(unittest.TestCase): def test_issue9324(self): + # Updated for issue #10003, adding SIGBREAK handler = lambda x, y: None - signal.signal(signal.SIGABRT, handler) - signal.signal(signal.SIGFPE, handler) - signal.signal(signal.SIGILL, handler) - signal.signal(signal.SIGINT, handler) - signal.signal(signal.SIGSEGV, handler) - signal.signal(signal.SIGTERM, handler) + 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)) with self.assertRaises(ValueError): signal.signal(-1, handler) |