holger krekel <holger.kre...@gmail.com> added the comment: To recap the use case: stdout is redirected during a test function run which might trigger arbitrary usage of logging-functionality. Not closing the temporary file would mean that there could be as many open files as there are test functions - or one needs to rely on garbage collection for closing the resource - this is generally considered bad practise. So I consider it best practise to do resource cleanup immediately and close the temp file.
Note that the test tool *does not touch the logging module at all*, and it has no way to mandate the usage of the logging module like you suggest. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6333> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com