mirror of https://github.com/python/cpython
Issue #12333: fix test_distutils failures under Solaris and derivatives. Patch by Antoine Pitrou
This commit is contained in:
parent
fa4736ef2f
commit
c6072d8675
|
@ -63,9 +63,13 @@ class TempdirManager(object):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TempdirManager, self).setUp()
|
super(TempdirManager, self).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(TempdirManager, self).tearDown()
|
super(TempdirManager, self).tearDown()
|
||||||
while self.tempdirs:
|
while self.tempdirs:
|
||||||
d = self.tempdirs.pop()
|
d = self.tempdirs.pop()
|
||||||
|
|
Loading…
Reference in New Issue