1
0
Fork 0
mirror of synced 2025-07-03 03:47:20 +02:00

Improve the reliability of the office parser

This commit is contained in:
jvoisin 2018-06-21 23:18:50 +02:00
parent 846a261465
commit 5b38bd7ccd
2 changed files with 12 additions and 0 deletions

View file

@ -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')