mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +00:00
[3.12] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). (#123436)
(cherry picked from commit 61bef6245c
)
This commit is contained in:
parent
ccc6c2b8c0
commit
0181aa2e3e
6 changed files with 40 additions and 9 deletions
|
@ -1163,8 +1163,16 @@ class TestCase(unittest.TestCase):
|
|||
except Exception as e:
|
||||
return e
|
||||
|
||||
def iter_raises():
|
||||
try:
|
||||
for x in BrokenIter(iter_raises=True):
|
||||
pass
|
||||
except Exception as e:
|
||||
return e
|
||||
|
||||
for func, expected in [(init_raises, "BrokenIter(init_raises=True)"),
|
||||
(next_raises, "BrokenIter(next_raises=True)"),
|
||||
(iter_raises, "BrokenIter(iter_raises=True)"),
|
||||
]:
|
||||
with self.subTest(func):
|
||||
exc = func()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue