fix test case
authorStefan Behnel <scoder@users.berlios.de>
Tue, 3 Mar 2009 19:43:13 +0000 (20:43 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 3 Mar 2009 19:43:13 +0000 (20:43 +0100)
tests/bugs/funcexc_iter_T228.pyx

index f15251de372ed498835bef5dde1f58ffe172e43f..61ba010da41e733f81ed8bd55c5cfcb3a36d2edc 100644 (file)
@@ -8,6 +8,18 @@ __doc__ = u"""
 >>> list(cy_iterator())
 []
 
+>>> try:
+...     raise ValueError
+... except:
+...     print(sys.exc_info()[0] is ValueError or sys.exc_info()[0])
+...     a = list(py_iterator())
+...     print(sys.exc_info()[0] is ValueError or sys.exc_info()[0])
+True
+True
+
+>>> print(sys.exc_info()[0] is None or sys.exc_info()[0])
+True
+
 >>> try:
 ...     raise ValueError
 ... except:
@@ -20,8 +32,7 @@ True
 True
 True
 
->>> if IS_PY3: print(sys.exc_info()[0] is None or sys.exc_info()[0])
-... else: print(sys.exc_info()[0] is ValueError or sys.exc_info()[0])
+>>> print(sys.exc_info()[0] is None or sys.exc_info()[0])
 True
 
 >>> double_raise(py_iterator)
@@ -29,8 +40,7 @@ True
 True
 True
 
->>> if IS_PY3: print(sys.exc_info()[0] is None or sys.exc_info()[0])
-... else: print(sys.exc_info()[0] is ValueError or sys.exc_info()[0])
+>>> print(sys.exc_info()[0] is None or sys.exc_info()[0])
 True
 """