From 83389a63e9b3e145f527cccf583b30bbe1993f4c Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 22 Oct 2018 13:42:04 +0200 Subject: Test mat2's reliability wrt. corrupted video files --- tests/test_corrupted_files.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/test_corrupted_files.py') diff --git a/tests/test_corrupted_files.py b/tests/test_corrupted_files.py index 8d7c252..c92f0be 100644 --- a/tests/test_corrupted_files.py +++ b/tests/test_corrupted_files.py @@ -5,7 +5,8 @@ import shutil import os import logging -from libmat2 import pdf, images, audio, office, parser_factory, torrent, harmless +from libmat2 import pdf, images, audio, office, parser_factory, torrent +from libmat2 import harmless, video # No need to logging messages, should something go wrong, # the testsuite _will_ fail. @@ -192,3 +193,9 @@ class TestCorruptedFiles(unittest.TestCase): with self.assertRaises(ValueError): images.JPGParser('./tests/data/clean.jpg') os.remove('./tests/data/clean.jpg') + + def test_avi(self): + shutil.copy('./tests/data/dirty.torrent', './tests/data/clean.avi') + p = video.AVIParser('./tests/data/clean.avi') + self.assertFalse(p.remove_all()) + os.remove('./tests/data/clean.avi') -- cgit v1.3