diff options
| author | jvoisin | 2018-10-22 13:42:04 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-22 13:42:04 +0200 |
| commit | 83389a63e9b3e145f527cccf583b30bbe1993f4c (patch) | |
| tree | cead9df89950e5c8c135043840fcc6d85777959e /tests/test_libmat2.py | |
| parent | e70ea811c99c16f3382c08153eda573df0825536 (diff) | |
Test mat2's reliability wrt. corrupted video files
Diffstat (limited to 'tests/test_libmat2.py')
| -rw-r--r-- | tests/test_libmat2.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 37adc6a..e5cc8a3 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -477,16 +477,18 @@ class TestCleaning(unittest.TestCase): | |||
| 477 | os.remove('./tests/data/clean.cleaned.cleaned.txt') | 477 | os.remove('./tests/data/clean.cleaned.cleaned.txt') |
| 478 | 478 | ||
| 479 | def test_avi(self): | 479 | def test_avi(self): |
| 480 | try: | ||
| 481 | video._get_ffmpeg_path() | ||
| 482 | except RuntimeError: | ||
| 483 | raise unittest.SkipTest | ||
| 484 | |||
| 480 | shutil.copy('./tests/data/dirty.avi', './tests/data/clean.avi') | 485 | shutil.copy('./tests/data/dirty.avi', './tests/data/clean.avi') |
| 481 | p = video.AVIParser('./tests/data/clean.avi') | 486 | p = video.AVIParser('./tests/data/clean.avi') |
| 482 | 487 | ||
| 483 | meta = p.get_meta() | 488 | meta = p.get_meta() |
| 484 | self.assertEqual(meta['Software'], 'MEncoder SVN-r33148-4.0.1') | 489 | self.assertEqual(meta['Software'], 'MEncoder SVN-r33148-4.0.1') |
| 485 | 490 | ||
| 486 | try: | 491 | ret = p.remove_all() |
| 487 | ret = p.remove_all() | ||
| 488 | except RuntimeError: | ||
| 489 | return # this happens if ffmepg is not installed | ||
| 490 | self.assertTrue(ret) | 492 | self.assertTrue(ret) |
| 491 | 493 | ||
| 492 | p = video.AVIParser('./tests/data/clean.cleaned.avi') | 494 | p = video.AVIParser('./tests/data/clean.cleaned.avi') |
