mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-42634: Mark reraise after except blocks as artificial. (GH-23877)
* Mark reraise after except blocks as artificial. * Update importlib * Update dis test.
This commit is contained in:
parent
d515c610c6
commit
f2dbfd7e20
6 changed files with 5067 additions and 5036 deletions
|
@ -791,6 +791,25 @@ class TraceTestCase(unittest.TestCase):
|
|||
(4, 'line'),
|
||||
(4, 'return')])
|
||||
|
||||
def test_try_except_with_wrong_type(self):
|
||||
|
||||
def func():
|
||||
try:
|
||||
2/0
|
||||
except IndexError:
|
||||
4
|
||||
finally:
|
||||
return 6
|
||||
|
||||
self.run_and_compare(func,
|
||||
[(0, 'call'),
|
||||
(1, 'line'),
|
||||
(2, 'line'),
|
||||
(2, 'exception'),
|
||||
(3, 'line'),
|
||||
(6, 'line'),
|
||||
(6, 'return')])
|
||||
|
||||
|
||||
class SkipLineEventsTraceTestCase(TraceTestCase):
|
||||
"""Repeat the trace tests, but with per-line events skipped"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue