Commit 972b3048 authored by Stefan Behnel's avatar Stefan Behnel

extended with statement test case - disabled for now as it triggers a crash

parent b97c5be5
......@@ -9,6 +9,12 @@ exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
enter
value
exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
>>> with_return()
enter
exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
>>> with_pass()
enter
exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
>>> with_exception(None)
enter
value
......@@ -59,6 +65,16 @@ def basic():
with ContextManager(u"value") as x:
print x
def with_pass():
with ContextManager(u"value") as x:
pass
def with_return():
with ContextManager(u"value") as x:
# FIXME: DISABLED - currently crashes!!
# return x
pass
def with_exception(exit_ret):
try:
with ContextManager(u"value", exit_ret=exit_ret) as value:
......
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