aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_free_threading/test_itertools.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_free_threading/test_itertools.py')
-rw-r--r--Lib/test/test_free_threading/test_itertools.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_free_threading/test_itertools.py b/Lib/test/test_free_threading/test_itertools.py
index 8360afbf78c..b8663ade1d4 100644
--- a/Lib/test/test_free_threading/test_itertools.py
+++ b/Lib/test/test_free_threading/test_itertools.py
@@ -44,7 +44,10 @@ class ItertoolsThreading(unittest.TestCase):
def work(it):
barrier.wait()
for _ in range(number_of_cycles):
- _ = next(it)
+ try:
+ next(it)
+ except StopIteration:
+ pass
data = (1, 2, 3, 4)
for it in range(number_of_iterations):