summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-08-28 16:11:52 (GMT)
committerGitHub <noreply@github.com>2024-08-28 16:11:52 (GMT)
commit61bef6245c4a32bf430d684ede8603f423d63284 (patch)
treedbd4df2f696e2f7c1c576ddd63ec8440c5b82cf2 /Lib/test/support
parent40fff90ae3d46843bb9d27c6a53ef61c861a3bb4 (diff)
downloadcpython-61bef6245c4a32bf430d684ede8603f423d63284.zip
cpython-61bef6245c4a32bf430d684ede8603f423d63284.tar.gz
cpython-61bef6245c4a32bf430d684ede8603f423d63284.tar.bz2
gh-123142: fix too wide source location of GET_ITER/GET_AITER (#123420)
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 19bbd40..3149fd7 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -2850,14 +2850,17 @@ def get_signal_name(exitcode):
return None
class BrokenIter:
- def __init__(self, init_raises=False, next_raises=False):
+ def __init__(self, init_raises=False, next_raises=False, iter_raises=False):
if init_raises:
1/0
self.next_raises = next_raises
+ self.iter_raises = iter_raises
def __next__(self):
if self.next_raises:
1/0
def __iter__(self):
+ if self.iter_raises:
+ 1/0
return self