MCPcopy Index your code
hub / github.com/python/cpython / test_original_excepthook

Method test_original_excepthook

Lib/test/test_sys.py:167–176  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

165
166 @force_not_colorized
167 def test_original_excepthook(self):
168 try:
169 raise ValueError(42)
170 except ValueError as exc:
171 with support.captured_stderr() as err:
172 sys.__excepthook__(*sys.exc_info())
173
174 self.assertEndsWith(err.getvalue(), "ValueError: 42\n")
175
176 self.assertRaises(TypeError, sys.__excepthook__)
177
178 @force_not_colorized
179 def test_excepthook_bytes_filename(self):

Callers

nothing calls this directly

Calls 3

assertEndsWithMethod · 0.80
getvalueMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected