Skip to content
Snippets Groups Projects
Commit 0ea2108f authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests: Add testcase for yielding from a stopped generator.

parent eff85bb1
Branches
Tags
No related merge requests found
# Yielding from stopped generator is ok and results in None
def gen():
return 1
# This yield is just to make this a generator
yield
f = gen()
def run():
print((yield from f))
print((yield from f))
print((yield from f))
try:
next(run())
except StopIteration:
print("StopIteration")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment