diff options
| author | jvoisin | 2018-06-21 23:18:50 +0200 |
|---|---|---|
| committer | jvoisin | 2018-06-21 23:18:59 +0200 |
| commit | 5b38bd7ccd97cdca864351b4af0fcbaa227f509e (patch) | |
| tree | 503037b7e2f0426db11fcee7acfbe3af138a5ff3 /tests | |
| parent | 846a261465a95a594e9bfc5398cf09fd5deb437f (diff) | |
Improve the reliability of the office parser
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_libmat2.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 4b312de..e1d949d 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -90,6 +90,11 @@ class TestCorruptedFiles(unittest.TestCase): | |||
| 90 | 90 | ||
| 91 | os.remove('./tests/data/clean.torrent') | 91 | os.remove('./tests/data/clean.torrent') |
| 92 | 92 | ||
| 93 | def test_odg(self): | ||
| 94 | shutil.copy('./tests/data/dirty.png', './tests/data/clean.odg') | ||
| 95 | with self.assertRaises(ValueError): | ||
| 96 | office.LibreOfficeParser('./tests/data/clean.odg') | ||
| 97 | |||
| 93 | class TestGetMeta(unittest.TestCase): | 98 | class TestGetMeta(unittest.TestCase): |
| 94 | def test_pdf(self): | 99 | def test_pdf(self): |
| 95 | p = pdf.PDFParser('./tests/data/dirty.pdf') | 100 | p = pdf.PDFParser('./tests/data/dirty.pdf') |
