Author: Devin Jeanpierre <[email protected]>
Branch:
Changeset: r80201:954e1682cf0d
Date: 2015-10-12 02:04 -0700
http://bitbucket.org/pypy/pypy/changeset/954e1682cf0d/
Log: Add tests for tb_next.
diff --git a/pypy/module/cpyext/test/test_traceback.py
b/pypy/module/cpyext/test/test_traceback.py
--- a/pypy/module/cpyext/test/test_traceback.py
+++ b/pypy/module/cpyext/test/test_traceback.py
@@ -28,4 +28,13 @@
from_ref(space, rffi.cast(PyObject,
py_traceback.c_tb_frame)))
+ while not space.is_w(w_traceback, space.w_None):
+ next_w_traceback = space.getattr(w_traceback,
space.wrap("tb_next"))
+ next_py_traceback = py_traceback.c_tb_next
+ assert space.is_w(
+ next_w_traceback,
+ from_ref(space, rffi.cast(PyObject, next_py_traceback)))
+ w_traceback = next_w_traceback
+ py_traceback = next_py_traceback
+
api.Py_DecRef(py_obj)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit