1
0
Fork 0
mirror of synced 2025-07-04 04:17:29 +02:00

Refactor lightweight mode implementation

This commit is contained in:
jvoisin 2018-10-12 11:49:24 +02:00
parent 6ce88b8b7f
commit b832a59414
4 changed files with 13 additions and 13 deletions

View file

@ -190,7 +190,8 @@ class TestLightWeightCleaning(unittest.TestCase):
meta = p.get_meta()
self.assertEqual(meta['producer'], 'pdfTeX-1.40.14')
ret = p.remove_all_lightweight()
p.lightweight_cleaning = True
ret = p.remove_all()
self.assertTrue(ret)
p = pdf.PDFParser('./tests/data/clean.cleaned.pdf')
@ -207,7 +208,8 @@ class TestLightWeightCleaning(unittest.TestCase):
meta = p.get_meta()
self.assertEqual(meta['Comment'], 'This is a comment, be careful!')
ret = p.remove_all_lightweight()
p.lightweight_cleaning = True
ret = p.remove_all()
self.assertTrue(ret)
p = images.PNGParser('./tests/data/clean.cleaned.png')