mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Ensured that the archive module consistantly explicitly closed all files.
This commit is contained in:
parent
ca6015ca71
commit
ea1e8b38b3
2 changed files with 21 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue