[issue19880] unittest: on failure, TestCase.run() keeps a reference to the exception

STINNER Victor report at bugs.python.org
Wed Dec 4 01:15:10 CET 2013


STINNER Victor added the comment:

unittest_leak.patch: Fix the the initial bug, unittest_leak.py.

I don't think that it's possible to write a generic fix for frame_ref_cycle.py. Storing sys.exc_info() to format it as a traceback later is a common pattern. Clearing a frame at function exit breaks this use case.

----------
nosy: +ezio.melotti
Added file: http://bugs.python.org/file32957/unittest_leak.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19880>
_______________________________________


More information about the Python-bugs-list mailing list