summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@rd.io>2012-08-15 02:53:40 -0700
committerAlex Gaynor <alex.gaynor@rd.io>2012-08-15 02:53:40 -0700
commitea1e8b38b3bbf8f21f22028ac256ce62c40d1fc1 (patch)
treed2d800f7ef581c7db486d18c7091ccdc2197f02f /tests
parentca6015ca71785dc59106ca36634d93daf59ff5bb (diff)
Ensured that the archive module consistantly explicitly closed all files.
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/utils/archive.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/regressiontests/utils/archive.py b/tests/regressiontests/utils/archive.py
index 0927c624f3..5575f340f6 100644
--- a/tests/regressiontests/utils/archive.py
+++ b/tests/regressiontests/utils/archive.py
@@ -27,12 +27,14 @@ class ArchiveTester(object):
os.chdir(self.old_cwd)
def test_extract_method(self):
- Archive(self.archive).extract(self.tmpdir)
+ with Archive(self.archive) as archive:
+ archive.extract(self.tmpdir)
self.check_files(self.tmpdir)
def test_extract_method_no_to_path(self):
os.chdir(self.tmpdir)
- Archive(self.archive_path).extract()
+ with Archive(self.archive_path) as archive:
+ archive.extract()
self.check_files(self.tmpdir)
def test_extract_function(self):