# HG changeset patch # User Shun-ichi Goto # Date 1431578992 -32400 # Node ID 0f1f88e71138923c4e9c5c84f9406bd42f0ea980 # Parent f97b8c333c9e40d3238bc4fb73eca1e2a33ad673 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). diff --git a/tests/test_util.py b/tests/test_util.py --- 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()