mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Ensured that the archive module consistantly explicitly closed all files.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user