1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

[1.6.x] 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

Backport of 978e1351a6 of master
This commit is contained in:
Kevin Christopher Henry
2013-09-19 17:02:49 -04:00
committed by Tim Graham
parent 06b149e220
commit 02c7dbd255
2 changed files with 19 additions and 7 deletions

View File

@@ -175,3 +175,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)