From: Stefan Behnel Date: Tue, 30 Dec 2008 12:15:53 +0000 (+0100) Subject: Py3 test case fix X-Git-Tag: 0.11-beta~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5ed722fb0804128a0bfb65bed8fc394a34559248;p=cython.git Py3 test case fix --- 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])