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

Method reraise

Lib/test/test_raise.py:48–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47 def test_except_reraise(self):
48 def reraise():
49 try:
50 raise TypeError("foo")
51 except TypeError:
52 try:
53 raise KeyError("caught")
54 except KeyError:
55 pass
56 raise
57 self.assertRaises(TypeError, reraise)
58
59 def test_finally_reraise(self):

Callers

nothing calls this directly

Calls 1

ContextClass · 0.70

Tested by

no test coverage detected