mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +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
|
@ -71,8 +71,10 @@ class BuildScriptsTestCase(support.TempdirManager,
|
|||
|
||||
def write_script(self, dir, name, text):
|
||||
f = open(os.path.join(dir, name), "w")
|
||||
f.write(text)
|
||||
f.close()
|
||||
try:
|
||||
f.write(text)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
def test_version_int(self):
|
||||
source = self.mkdtemp()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue