1
0
mirror of synced 2024-11-25 18:54:22 +01:00

Improve a bit the coverage

This commit is contained in:
jvoisin 2018-06-10 20:20:45 +02:00
parent 545887af98
commit 4600ce3490

View File

@ -70,6 +70,12 @@ class TestCorruptedFiles(unittest.TestCase):
images.PNGParser('./tests/data/clean.pdf') images.PNGParser('./tests/data/clean.pdf')
os.remove('./tests/data/clean.pdf') os.remove('./tests/data/clean.pdf')
def test_png2(self):
shutil.copy('./tests/test_libmat2.py', './tests/clean.png')
parser, mimetype = parser_factory.get_parser('./tests/clean.png')
self.assertIsNone(parser)
os.remove('./tests/clean.png')
def test_torrent(self): def test_torrent(self):
shutil.copy('./tests/data/dirty.png', './tests/data/clean.torrent') shutil.copy('./tests/data/dirty.png', './tests/data/clean.torrent')
p = torrent.TorrentParser('./tests/data/clean.torrent') p = torrent.TorrentParser('./tests/data/clean.torrent')