gh-128078: Use PyErr_SetRaisedException in _PyGen_SetStopIterationValue (#128287)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Bénédikt Tran 2025-01-13 16:54:13 +01:00 committed by GitHub
parent 3efe28a40b
commit 402b91da87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 23 deletions

View file

@ -1165,7 +1165,7 @@ class AsyncGenAsyncioTest(unittest.TestCase):
with self.assertRaises(StopAsyncIteration):
await it.__anext__()
res = await anext(it, ('a', 'b'))
self.assertEqual(res, ('a', 'b'))
self.assertTupleEqual(res, ('a', 'b'))
self.loop.run_until_complete(run())