[issue22831] Use "with" to avoid possible fd leaks
Serhiy Storchaka
report at bugs.python.org
Wed Dec 5 12:12:22 EST 2018
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
self.addCleanup(f.close) can not be used if the same file should be opened several times in the test. It can not be used also if the file is deleted in the test or in tearDown().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22831>
_______________________________________
More information about the Python-bugs-list
mailing list