diff options
Diffstat (limited to 'Lib/distutils/tests/test_file_util.py')
-rw-r--r-- | Lib/distutils/tests/test_file_util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_file_util.py b/Lib/distutils/tests/test_file_util.py index fac4a5d..74618b5 100644 --- a/Lib/distutils/tests/test_file_util.py +++ b/Lib/distutils/tests/test_file_util.py @@ -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 = [] |