STINNER Victor added the comment: It would be nice to have unit tests and docs :-)
For unit test, you can use a script like: --- def func(): return 1 __ltrace__ = True func() --- Run the script with test.support.assert_python_ok(), and check stdout. To skip the test if Python is compiled in released mode, you can use: --- # Were we compiled --with-pydebug or with #define Py_DEBUG? Py_DEBUG = hasattr(sys, 'gettotalrefcount') ... @unittest.skipUnless(Py_DEBUG, 'need Py_DEBUG') --- ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25571> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com