Skip to content

Commit

Permalink
Issue #12333: fix test_distutils failures under Solaris and derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Aug 25, 2011
1 parent b0993bc commit 08e544e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/distutils/tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ class TempdirManager(object):

def setUp(self):
super().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().tearDown()
while self.tempdirs:
d = self.tempdirs.pop()
Expand Down

0 comments on commit 08e544e

Please sign in to comment.