mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Always close files in distutils code and tests (#10252).
This commit is contained in:
parent
afb078dd26
commit
bee5cef7db
24 changed files with 261 additions and 171 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue