summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_setcomps.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-08-28 17:41:22 (GMT)
committerGitHub <noreply@github.com>2024-08-28 17:41:22 (GMT)
commitd379a92ddce55d3b89956fb556fb9ed654de0bf0 (patch)
tree0f585f730e109ef1fe9a0b9dc4af1ea000b199a5 /Lib/test/test_setcomps.py
parent19a1f187402f557cf193c408ebba3ede1ce9f893 (diff)
downloadcpython-d379a92ddce55d3b89956fb556fb9ed654de0bf0.zip
cpython-d379a92ddce55d3b89956fb556fb9ed654de0bf0.tar.gz
cpython-d379a92ddce55d3b89956fb556fb9ed654de0bf0.tar.bz2
[3.13] gh-123142: fix too wide source location of GET_ITER/GET_AITER (GH-123420). (#123435)
(cherry picked from commit 61bef6245c4a32bf430d684ede8603f423d63284)
Diffstat (limited to 'Lib/test/test_setcomps.py')
-rw-r--r--Lib/test/test_setcomps.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_setcomps.py b/Lib/test/test_setcomps.py
index ba4173c..0bb02ef 100644
--- a/Lib/test/test_setcomps.py
+++ b/Lib/test/test_setcomps.py
@@ -168,8 +168,15 @@ class SetComprehensionTest(unittest.TestCase):
except Exception as e:
return e
+ def iter_raises():
+ try:
+ {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()