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:
committed by
Tim Graham
parent
06b149e220
commit
02c7dbd255
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user