Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch by Antoine Pitrou

This commit is contained in:
Jesus Cea 2011-09-09 18:50:59 +02:00
parent fa4736ef2f
commit c6072d8675
1 changed files with 4 additions and 0 deletions

View File

@ -63,9 +63,13 @@ class TempdirManager(object):
def setUp(self):
super(TempdirManager, self).setUp()
self.old_cwd = os.getcwd()
self.tempdirs = []
def tearDown(self):
# Restore working dir, for Solaris and derivatives, where rmdir()
# on the current directory fails.
os.chdir(self.old_cwd)
super(TempdirManager, self).tearDown()
while self.tempdirs:
d = self.tempdirs.pop()