From 83f355634b0b901c7d07e2ba3f549c89835029a8 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Mon, 8 Mar 2010 18:05:59 +0100 Subject: [PATCH] Change back to old working directory after changing it for tests. --- tests/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 4aa4008..643ebd9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -44,12 +44,13 @@ class ArchiveTest (unittest.TestCase): archive = os.path.join(datadir, filename) # create a temporary directory for extraction tmpdir = patoolib.util.tmpdir(dir=basedir) + olddir = os.getcwd() os.chdir(tmpdir) try: patoolib._handle_archive(archive, 'extract', program=self.program) patoolib._handle_archive(archive, 'extract', program=self.program, verbose=True) finally: - os.chdir(basedir) + os.chdir(olddir) shutil.rmtree(tmpdir) def archive_list (self, filename):