Always close files in distutils code and tests (#10252).

This commit is contained in:
Éric Araujo 2010-11-05 23:51:56 +00:00
parent afb078dd26
commit bee5cef7db
24 changed files with 261 additions and 171 deletions

View file

@ -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