[New-bugs-announce] [issue39766] unittest's assertRaises removes locals from tracebacks

daniel hahler report at bugs.python.org
Wed Feb 26 17:01:11 EST 2020


New submission from daniel hahler <python-bugs at thequod.de>:

I was a bit surprised to find that unittest's assertRaises clears the locals on the traceback, which e.g. prevents pytest to display them in case of failures.

This was done via https://bugs.python.org/issue9815 (https://github.com/python/cpython/commit/9681022f1ee5c6c9160c515b24d2a3d1efe8b90d).

Maybe this should only get done for expected failures, so that unexpected exceptions can be inspected better?

----------
components: Library (Lib)
messages: 362744
nosy: blueyed
priority: normal
severity: normal
status: open
title: unittest's assertRaises removes locals from tracebacks
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39766>
_______________________________________


More information about the New-bugs-announce mailing list