summaryrefslogtreecommitdiff
path: root/tests/files
diff options
context:
space:
mode:
authorKevin Christopher Henry <k@severian.com>2013-09-19 17:02:49 -0400
committerTim Graham <timograham@gmail.com>2013-10-02 09:12:58 -0400
commit978e1351a60a0d7b44d367877784109ac01ebc62 (patch)
tree7d73941e77a7104cc42fca9d54e1232b9189f61c /tests/files
parent5381317fe37d50384ef9a3bf3fb6b64ff4e9215c (diff)
downloaddjango-978e1351a60a0d7b44d367877784109ac01ebc62.tar.gz
Fixed #21122 -- Improved clean up of test temp directory on Windows
- Fixed test that didn't close the files it opened - Caught and handled exception when temp directory cannot be removed
Diffstat (limited to 'tests/files')
-rw-r--r--tests/files/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/files/tests.py b/tests/files/tests.py
index fbc1b1fe6c..36664fa83a 100644
--- a/tests/files/tests.py
+++ b/tests/files/tests.py
@@ -174,3 +174,6 @@ class FileMoveSafeTests(unittest.TestCase):
# should allow it and continue on if allow_overwrite is True
self.assertIsNone(file_move_safe(self.file_a, self.file_b, allow_overwrite=True))
+
+ os.close(handle_a)
+ os.close(handle_b)