mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
NULL and no exception set from tp_iternext means StopIteration
This commit is contained in:
parent
9a80fa81b0
commit
0296a56520
2 changed files with 7 additions and 1 deletions
|
@ -831,6 +831,11 @@ class TestPEP380Operation(unittest.TestCase):
|
|||
"Enter f",
|
||||
])
|
||||
|
||||
def test_yield_from_empty(self):
|
||||
def g():
|
||||
yield from ()
|
||||
self.assertRaises(StopIteration, next, g())
|
||||
|
||||
|
||||
def test_main():
|
||||
from test import support
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue