summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2011-05-23 16:31:20 (GMT)
committerTarek Ziade <tarek@ziade.org>2011-05-23 16:31:20 (GMT)
commiteb64b61bf5c774fc0694287d5ad70061e1b94614 (patch)
tree94117ed774a0de45ae0c7000acfd0ce458278523 /Lib/packaging/tests
parent7870bdff5a16c7440a6db5ef5f91082d27a4c482 (diff)
downloadcpython-eb64b61bf5c774fc0694287d5ad70061e1b94614.zip
cpython-eb64b61bf5c774fc0694287d5ad70061e1b94614.tar.gz
cpython-eb64b61bf5c774fc0694287d5ad70061e1b94614.tar.bz2
make sure the cwd is restored on tearDown
Diffstat (limited to 'Lib/packaging/tests')
-rw-r--r--Lib/packaging/tests/test_config.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_config.py b/Lib/packaging/tests/test_config.py
index 6f70817..a276730 100644
--- a/Lib/packaging/tests/test_config.py
+++ b/Lib/packaging/tests/test_config.py
@@ -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'}