[2.7] bpo-18174: Fix file descriptor leaks in tests by vstinner · Pull Request #7408 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Conversation
- test_tempfile.test_no_leak_fd() mocks os.close() but it doesn't
call the original os.close() method and so leaks an open file
descriptor. Fix the test by calling the original os.close()
function. - test_posix.test_fdopen_directory(): close the directory file
descriptor when the test completes.
* test_tempfile.test_no_leak_fd() mocks os.close() but it doesn't call the original os.close() method and so leaks an open file descriptor. Fix the test by calling the original os.close() function. * test_posix.test_fdopen_directory(): close the directory file descriptor when the test completes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters