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())
|
self.addCleanup(os.chdir, os.getcwd())
|
||||||
tempdir = self.mkdtemp()
|
tempdir = self.mkdtemp()
|
||||||
|
self.working_dir = os.getcwd()
|
||||||
os.chdir(tempdir)
|
os.chdir(tempdir)
|
||||||
self.tempdir = tempdir
|
self.tempdir = tempdir
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
os.chdir(self.working_dir)
|
||||||
|
super(ConfigTestCase, self).tearDown()
|
||||||
|
|
||||||
def write_setup(self, kwargs=None):
|
def write_setup(self, kwargs=None):
|
||||||
opts = {'description-file': 'README', 'extra-files': '',
|
opts = {'description-file': 'README', 'extra-files': '',
|
||||||
'setup-hook': 'packaging.tests.test_config.hook'}
|
'setup-hook': 'packaging.tests.test_config.hook'}
|
||||||
|
|
Loading…
Reference in New Issue