mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
[3.13] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). (#123435)
(cherry picked from commit 61bef6245c
)
This commit is contained in:
parent
19a1f18740
commit
d379a92ddc
6 changed files with 40 additions and 9 deletions
|
@ -145,8 +145,15 @@ class DictComprehensionTest(unittest.TestCase):
|
|||
except Exception as e:
|
||||
return e
|
||||
|
||||
def iter_raises():
|
||||
try:
|
||||
{x:x for x in BrokenIter(iter_raises=True)}
|
||||
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