[3.13] GH-135171: Roll back all fixes for GH-127682 as they are not suitable for 3.13 (#135390)

This commit is contained in:
T. Wouters 2025-06-11 16:57:35 +02:00 committed by GitHub
parent 5f5b173cc7
commit 6ae51582a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 30 additions and 72 deletions

View file

@ -750,28 +750,6 @@ def iter_raises():
self.assertEqual(f.line[f.colno - indent : f.end_colno - indent],
expected)
def test_only_calls_dunder_iter_once(self):
class Iterator:
def __init__(self):
self.val = 0
def __next__(self):
if self.val == 2:
raise StopIteration
self.val += 1
return self.val
# No __iter__ method
class C:
def __iter__(self):
return Iterator()
self.assertEqual([1,2], [i for i in C()])
__test__ = {'doctests' : doctests}
def load_tests(loader, tests, pattern):