[issue22937] unittest errors can't show locals
Robert Collins added the comment: Fixed (patch referenced 22936) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22937] unittest errors can't show locals
Guido van Rossum added the comment: Note that IIRC py.test (a 3rd party module) will show you additional information in the traceback. SO it is definitely possible. -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22937] unittest errors can't show locals
Guido van Rossum added the comment: Sorry, I missed the part where you said we can't depend on PyPI. There already is something in the stdlib that may be close enough to what you're looking for -- checkout cgitb.py. The following might even work: import cgitb cgitb.enable(format='text') That code is very old and primarily meant for CGI scripts (that shows how old it is!) but it still works. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22937] unittest errors can't show locals
New submission from Robert Collins: From https://github.com/testing-cabal/testtools/issues/111 - any code that is data dependent can be hard to diagnose from a backtrace alone. Many unittest and server environments address this by doing custom tracebacks that include locals. To address this in unittest, we need to add a similar capacity to traceback, and then use it from unittest (as we can't just depend on a module from PyPI in the stdlib). This issue is for the unittest part of it. For the traceback dependency see http://bugs.python.org/issue22936 . -- components: Library (Lib) messages: 231629 nosy: rbcollins priority: normal severity: normal status: open title: unittest errors can't show locals type: enhancement versions: Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22937 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com