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'> ...@@ -9,6 +9,12 @@ exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'>
enter enter
value value
exit <type 'NoneType'> <type 'NoneType'> <type 'NoneType'> 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) >>> with_exception(None)
enter enter
value value
...@@ -58,6 +64,16 @@ def no_as(): ...@@ -58,6 +64,16 @@ def no_as():
def basic(): def basic():
with ContextManager(u"value") as x: with ContextManager(u"value") as x:
print 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): def with_exception(exit_ret):
try: 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