Commit 3b9a1c74 authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #12333: fix test_distutils failures under Solaris and derivatives

parent 48f414ce
...@@ -54,9 +54,13 @@ class TempdirManager(object): ...@@ -54,9 +54,13 @@ class TempdirManager(object):
def setUp(self): def setUp(self):
super().setUp() super().setUp()
self.old_cwd = os.getcwd()
self.tempdirs = [] self.tempdirs = []
def tearDown(self): def tearDown(self):
# Restore working dir, for Solaris and derivatives, where rmdir()
# on the current directory fails.
os.chdir(self.old_cwd)
super().tearDown() super().tearDown()
while self.tempdirs: while self.tempdirs:
d = self.tempdirs.pop() d = self.tempdirs.pop()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment