Author: Ronan Lamy <ronan.l...@gmail.com> Branch: py3.5 Changeset: r92426:36d12b5e3f5a Date: 2017-09-20 19:30 +0100 http://bitbucket.org/pypy/pypy/changeset/36d12b5e3f5a/
Log: Save and restore sys.exc_info() in the test, like real code (Cython) does diff --git a/pypy/module/cpyext/test/test_exception.py b/pypy/module/cpyext/test/test_exception.py --- a/pypy/module/cpyext/test/test_exception.py +++ b/pypy/module/cpyext/test/test_exception.py @@ -51,6 +51,8 @@ ("raise_exc", "METH_NOARGS", """ PyObject *ev, *et, *tb; + PyObject *ev0, *et0, *tb0; + PyErr_GetExcInfo(&ev0, &et0, &tb0); PyErr_SetString(PyExc_ValueError, "foo"); // simplified copy of __Pyx_GetException @@ -60,6 +62,7 @@ PyErr_SetExcInfo(et, ev, tb); PyErr_SetString(PyExc_TypeError, "bar"); + PyErr_SetExcInfo(ev0, et0, tb0); return NULL; """)]) excinfo = raises(TypeError, module.raise_exc) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit