diff options
author | Éric Araujo <merwok@netwok.org> | 2010-11-05 23:51:56 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2010-11-05 23:51:56 (GMT) |
commit | bee5cef7dbff40734c347da5b93797e8db9103e8 (patch) | |
tree | 06dcc726207cfad3016f2b0f7c365fb9fe5b3cc6 /Lib/distutils/tests/test_install.py | |
parent | afb078dd2673d919ac3733104757c441f256f30f (diff) | |
download | cpython-bee5cef7dbff40734c347da5b93797e8db9103e8.zip cpython-bee5cef7dbff40734c347da5b93797e8db9103e8.tar.gz cpython-bee5cef7dbff40734c347da5b93797e8db9103e8.tar.bz2 |
Always close files in distutils code and tests (#10252).
Diffstat (limited to 'Lib/distutils/tests/test_install.py')
-rw-r--r-- | Lib/distutils/tests/test_install.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py index 76fa02a..bc407cf 100644 --- a/Lib/distutils/tests/test_install.py +++ b/Lib/distutils/tests/test_install.py @@ -182,8 +182,11 @@ class InstallTestCase(support.TempdirManager, # let's check the RECORD file was created with one # line (the egg info file) - with open(cmd.record) as f: + f = open(cmd.record) + try: self.assertEquals(len(f.readlines()), 1) + finally: + f.close() def test_debug_mode(self): # this covers the code called when DEBUG is set |