]> granicus.if.org Git - python/commitdiff
add NEWS note and test for last commit
authorBenjamin Peterson <benjamin@python.org>
Sat, 23 Aug 2008 20:19:17 +0000 (20:19 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 23 Aug 2008 20:19:17 +0000 (20:19 +0000)
Lib/test/test_sys.py
Misc/NEWS

index 04288d9fd67a254bac8f3ce60027ceb796da661b..2b9a5d5bce4ef34c06e92406b7871b8c97553e29 100644 (file)
@@ -62,6 +62,12 @@ class SysModuleTest(unittest.TestCase):
 
         self.assert_(err.getvalue().endswith("ValueError: 42\n"))
 
+    def test_excepthook(self):
+        with test.support.captured_output("stderr") as stderr:
+            sys.excepthook(1, '1', 1)
+        self.assert_("TypeError: print_exception(): Exception expected for " \
+                         "value, str found" in stderr.getvalue())
+
     # FIXME: testing the code for a lost or replaced excepthook in
     # Python/pythonrun.c::PyErr_PrintEx() is tricky.
 
index dd91623af0ca4f2b26f3519b7179adebae25a112..83f1c9614905e1172b6e2348954d7c77b8d92877 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -26,6 +26,9 @@ What's new in Python 3.0b3?
 Core and Builtins
 -----------------
 
+- Issue #3653: Fix a segfault when sys.excepthook was called with invalid
+  arguments.
+
 - Issue #2394: implement more of the memoryview API, with the caveat that
   only one-dimensional contiguous buffers are supported and exercised right
   now. Slicing, slice assignment and comparison (equality and inequality)