diff options
| author | jvoisin | 2018-10-12 11:49:24 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-12 11:49:24 +0200 |
| commit | b832a5941458083dd6147efb652036552f95b786 (patch) | |
| tree | e9a844f329b668a307772499740adbb1dc24e903 /tests | |
| parent | 6ce88b8b7f3f10d70b2fb890ed4970e7282a43b5 (diff) | |
Refactor lightweight mode implementation
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_libmat2.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py index 6a2af91..665bab0 100644 --- a/tests/test_libmat2.py +++ b/tests/test_libmat2.py | |||
| @@ -190,7 +190,8 @@ class TestLightWeightCleaning(unittest.TestCase): | |||
| 190 | meta = p.get_meta() | 190 | meta = p.get_meta() |
| 191 | self.assertEqual(meta['producer'], 'pdfTeX-1.40.14') | 191 | self.assertEqual(meta['producer'], 'pdfTeX-1.40.14') |
| 192 | 192 | ||
| 193 | ret = p.remove_all_lightweight() | 193 | p.lightweight_cleaning = True |
| 194 | ret = p.remove_all() | ||
| 194 | self.assertTrue(ret) | 195 | self.assertTrue(ret) |
| 195 | 196 | ||
| 196 | p = pdf.PDFParser('./tests/data/clean.cleaned.pdf') | 197 | p = pdf.PDFParser('./tests/data/clean.cleaned.pdf') |
| @@ -207,7 +208,8 @@ class TestLightWeightCleaning(unittest.TestCase): | |||
| 207 | meta = p.get_meta() | 208 | meta = p.get_meta() |
| 208 | self.assertEqual(meta['Comment'], 'This is a comment, be careful!') | 209 | self.assertEqual(meta['Comment'], 'This is a comment, be careful!') |
| 209 | 210 | ||
| 210 | ret = p.remove_all_lightweight() | 211 | p.lightweight_cleaning = True |
| 212 | ret = p.remove_all() | ||
| 211 | self.assertTrue(ret) | 213 | self.assertTrue(ret) |
| 212 | 214 | ||
| 213 | p = images.PNGParser('./tests/data/clean.cleaned.png') | 215 | p = images.PNGParser('./tests/data/clean.cleaned.png') |
