From 5b38bd7ccd97cdca864351b4af0fcbaa227f509e Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 21 Jun 2018 23:18:50 +0200 Subject: Improve the reliability of the office parser --- tests/test_libmat2.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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): os.remove('./tests/data/clean.torrent') + def test_odg(self): + shutil.copy('./tests/data/dirty.png', './tests/data/clean.odg') + with self.assertRaises(ValueError): + office.LibreOfficeParser('./tests/data/clean.odg') + class TestGetMeta(unittest.TestCase): def test_pdf(self): p = pdf.PDFParser('./tests/data/dirty.pdf') -- cgit v1.3