mirror of https://github.com/python/cpython
make sure the cwd is restored on tearDown
This commit is contained in:
parent
7870bdff5a
commit
eb64b61bf5
|
@ -176,9 +176,14 @@ class ConfigTestCase(support.TempdirManager,
|
|||
|
||||
self.addCleanup(os.chdir, os.getcwd())
|
||||
tempdir = self.mkdtemp()
|
||||
self.working_dir = os.getcwd()
|
||||
os.chdir(tempdir)
|
||||
self.tempdir = tempdir
|
||||
|
||||
def tearDown(self):
|
||||
os.chdir(self.working_dir)
|
||||
super(ConfigTestCase, self).tearDown()
|
||||
|
||||
def write_setup(self, kwargs=None):
|
||||
opts = {'description-file': 'README', 'extra-files': '',
|
||||
'setup-hook': 'packaging.tests.test_config.hook'}
|
||||
|
|
Loading…
Reference in New Issue