From 58c8b9a9164bc03ce07057fae94cccfa68fc92bc Mon Sep 17 00:00:00 2001 From: jvoisin <julien.voisin@dustri.org> Date: Sat, 27 Apr 2019 00:24:41 +0200 Subject: [PATCH] Bump coverage, again --- tests/test_corrupted_files.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index 54eeb3e..e9112cf 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py @@ -1,6 +1,8 @@ #!/usr/bin/env python3 import unittest +from io import BytesIO +import time import shutil import os import logging @@ -297,6 +299,12 @@ class TestCorruptedFiles(unittest.TestCase): zout.add('./tests/data/dirty.docx') zout.add('./tests/data/dirty.jpg') zout.add('./tests/data/embedded_corrupted.docx') + tarinfo = tarfile.TarInfo(name='./tests/data/dirty.png') + tarinfo.mtime = time.time() + tarinfo.uid = 1337 + tarinfo.gid = 1338 + with open('./tests/data/dirty.png', 'rb') as f: + zout.addfile(tarinfo, f) p, mimetype = parser_factory.get_parser('./tests/data/clean.tar') self.assertEqual(mimetype, 'application/x-tar') meta = p.get_meta() -- GitLab