summaryrefslogtreecommitdiff
path: root/tests/test_libmat2.py
diff options
context:
space:
mode:
authorjvoisin2018-10-22 19:12:39 +0200
committerjvoisin2018-10-23 13:49:58 +0200
commit38df679a88a19db3a4a82fdb8e20a42c9a53d1a1 (patch)
treee7eea36bae3341a97e2b9a730964cfe632fb74f5 /tests/test_libmat2.py
parent44f267a5964ea8dbb59c26c319e43fad84afb45a (diff)
Optimize the handling of problematic files
Diffstat (limited to '')
-rw-r--r--tests/test_libmat2.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index 241c6eb..f5fc9e8 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -46,10 +46,23 @@ class TestParameterInjection(unittest.TestCase):
46 shutil.copy('./tests/data/dirty.avi', './--output') 46 shutil.copy('./tests/data/dirty.avi', './--output')
47 p = video.AVIParser('--output') 47 p = video.AVIParser('--output')
48 meta = p.get_meta() 48 meta = p.get_meta()
49 print(meta)
50 self.assertEqual(meta['Software'], 'MEncoder SVN-r33148-4.0.1') 49 self.assertEqual(meta['Software'], 'MEncoder SVN-r33148-4.0.1')
51 os.remove('--output') 50 os.remove('--output')
52 51
52 def test_ffmpeg_injection_complete_path(self):
53 try:
54 video._get_ffmpeg_path()
55 except RuntimeError:
56 raise unittest.SkipTest
57
58 shutil.copy('./tests/data/dirty.avi', './tests/data/ --output.avi')
59 p = video.AVIParser('./tests/data/ --output.avi')
60 meta = p.get_meta()
61 self.assertEqual(meta['Software'], 'MEncoder SVN-r33148-4.0.1')
62 self.assertTrue(p.remove_all())
63 os.remove('./tests/data/ --output.avi')
64 os.remove('./tests/data/ --output.cleaned.avi')
65
53 66
54class TestUnsupportedEmbeddedFiles(unittest.TestCase): 67class TestUnsupportedEmbeddedFiles(unittest.TestCase):
55 def test_odt_with_svg(self): 68 def test_odt_with_svg(self):