Commit 9a53c8ac authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.29.x'

parents c2d76d32 c4a5b6ac
# mode: run
# tag: generators
# tag: generators, gh3265
try:
import backports_abc
......@@ -523,13 +523,16 @@ def test_generator_frame(a=1):
b = a + 1
yield b
# GH Issue 3265 - **kwds could cause a crash in some cases due to not
# handling NULL pointers (in testing it shows as a REFNANNY error).
# This was on creation of the generator and
# doesn't really require it to be iterated through:
def some_function():
return 0
def test_generator_kwds1(**kwargs):
"""
>>> for a in test_generator_kwds1():
......@@ -538,6 +541,7 @@ def test_generator_kwds1(**kwargs):
"""
yield some_function(**kwargs)
def test_generator_kwds2(**kwargs):
"""
>>> for a in test_generator_kwds2():
......@@ -546,6 +550,7 @@ def test_generator_kwds2(**kwargs):
"""
yield 0
def test_generator_kwds3(**kwargs):
"""
This didn't actually crash before but is still worth a try
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment