changeset 1337:0f1f88e71138 stable

tests: leave from the directory before removing On Windows, we need to leave from the direcotry before removing it, otherwise error 32 (ERROR_SHARING_VIOLATION).
author Shun-ichi Goto <shunichi.goto@gmail.com>
date Thu, 14 May 2015 13:49:52 +0900
parents f97b8c333c9e
children 356460fb01fa 74e82a7da393
files tests/test_util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -513,8 +513,8 @@ class TestBase(unittest.TestCase):
             i18n._ugettext = self.oldugettext  # Mercurial >= 3.2
         except AttributeError:
             i18n.t = self.oldt
-        rmtree(self.tmpdir)
         os.chdir(self.oldwd)
+        rmtree(self.tmpdir)
         setattr(ui.ui, self.patch[0].func_name, self.patch[0])
 
         _verify_our_modules()