Commit aa4e15d3 authored by Vitja Makarov's avatar Vitja Makarov

add test case for copied yield

parent 42928403
......@@ -259,3 +259,16 @@ def test_return(a):
yield 1
a['i_was_here'] = True
return
def test_copied_yield(foo):
"""
>>> class Manager(object):
... def __enter__(self):
... return self
... def __exit__(self, type, value, tb):
... pass
>>> list(test_copied_yield(Manager()))
[1]
"""
with foo:
yield 1
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