diff --git a/tests/run/funcexceptcypy.pyx b/tests/run/funcexceptcypy.pyx index f27a304a4c51b0bc852e6b773944cb78986edd64..97ccaf4ecce88c7180bbb103efc25ad5f0c7acd3 100644 --- a/tests/run/funcexceptcypy.pyx +++ b/tests/run/funcexceptcypy.pyx @@ -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])