mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Branch merge
This commit is contained in:
commit
2f24fda195
1 changed files with 4 additions and 0 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue