This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jhylton
Recipients
Date 2001-08-15.20:36:16
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
A TestResult object stores the exceptions raised when
tests fail.  The only use of these stored tracebacks,
it seems, is to print a stack trace when the test run's
report is generated.

The traceback objects, however, keep pointers to a bunch
of objects that might otherwise be garbage collected. 
I ran into this on Windows, where the traceback was
keeping a file object alive.  Because the file object
was not collected, my tearDown() method could not
remove the file.

This patch changes unittest to generate the formatted
traceback immediately, so that it does not keep
tracebacks around any longer than needed.
History
Date User Action Args
2007-08-23 13:55:46adminlinkissue451309 messages
2007-08-23 13:55:46admincreate