diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-01-13 19:54:31 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-01-13 19:54:31 (GMT) |
commit | 0296a565205651b60a3a5690432beb6f3333a7fc (patch) | |
tree | a0341f20773fab2e74c99a0b328743d29270cb3a /Lib/test/test_pep380.py | |
parent | 9a80fa81b0195bb744f89565bbc212d39c300942 (diff) | |
download | cpython-0296a565205651b60a3a5690432beb6f3333a7fc.zip cpython-0296a565205651b60a3a5690432beb6f3333a7fc.tar.gz cpython-0296a565205651b60a3a5690432beb6f3333a7fc.tar.bz2 |
NULL and no exception set from tp_iternext means StopIteration
Diffstat (limited to 'Lib/test/test_pep380.py')
-rw-r--r-- | Lib/test/test_pep380.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_pep380.py b/Lib/test/test_pep380.py index 53e9735..6554b0f 100644 --- a/Lib/test/test_pep380.py +++ b/Lib/test/test_pep380.py @@ -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 |