mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
add NEWS note and test for last commit
This commit is contained in:
parent
2658260f3b
commit
bc74e5be1a
2 changed files with 9 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue