From 5ed722fb0804128a0bfb65bed8fc394a34559248 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 30 Dec 2008 13:15:53 +0100 Subject: [PATCH] Py3 test case fix --- tests/run/funcexceptcypy.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run/funcexceptcypy.pyx b/tests/run/funcexceptcypy.pyx index f27a304a..97ccaf4e 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]) -- 2.26.2