diff tests/test_util.py @ 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 260212f056b7
children c6b01fd34694
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()