Py3 test case fix
authorStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:15:53 +0000 (13:15 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 30 Dec 2008 12:15:53 +0000 (13:15 +0100)
tests/run/funcexceptcypy.pyx

index f27a304a4c51b0bc852e6b773944cb78986edd64..97ccaf4ecce88c7180bbb103efc25ad5f0c7acd3 100644 (file)
@@ -3,12 +3,13 @@ __doc__ = u"""
 >>> if not IS_PY3: sys.exc_clear()
 
 >>> def test_py():
+...   old_exc = sys.exc_info()[0]
 ...   try:
 ...     raise AttributeError("test")
 ...   except AttributeError:
 ...     test_c(error=AttributeError)
 ...     print(sys.exc_info()[0] is AttributeError or sys.exc_info()[0])
-...   print((IS_PY3 and sys.exc_info()[0] is TestException) or
+...   print((IS_PY3 and sys.exc_info()[0] is old_exc) or
 ...         (not IS_PY3 and sys.exc_info()[0] is AttributeError) or
 ...         sys.exc_info()[0])