mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35: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
|
@ -31,8 +31,10 @@ class FileUtilTestCase(support.TempdirManager, unittest.TestCase):
|
|||
|
||||
def test_move_file_verbosity(self):
|
||||
f = open(self.source, 'w')
|
||||
f.write('some content')
|
||||
f.close()
|
||||
try:
|
||||
f.write('some content')
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
move_file(self.source, self.target, verbose=0)
|
||||
wanted = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue