extended with statement test case - disabled for now as it triggers a crash
authorStefan Behnel <scoder@users.berlios.de>
Sun, 7 Dec 2008 21:46:33 +0000 (22:46 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 7 Dec 2008 21:46:33 +0000 (22:46 +0100)
tests/run/withstat.pyx

index bb407af83677d6f5503a495f920bbe8228eb1780..6f43ea8b7b29ff2fc3fffcf0d05ec0788789f64f 100644 (file)
@@ -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
@@ -58,6 +64,16 @@ def no_as():
 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: