From: Kumar Aditya Date: Wed, 18 Jun 2025 16:41:35 +0000 (+0530) Subject: gh-135639: fix `test_cycle` test (#135662) X-Git-Tag: v3.15.0a1~1260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4dea6b48cc24aede7250534923d3ce9f9c8b87e6;p=thirdparty%2FPython%2Fcpython.git gh-135639: fix `test_cycle` test (#135662) --- diff --git a/Lib/test/test_free_threading/test_itertools.py b/Lib/test/test_free_threading/test_itertools.py index 8360afbf78ca..b8663ade1d4a 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):