pdfinfo: Refactor pageinfo dictionary into a class

This commit is contained in:
James R. Barlow
2020-12-24 01:47:53 -08:00
parent 4b8ccbe8cb
commit bb258fc99c
3 changed files with 60 additions and 43 deletions
+2 -2
View File
@@ -92,10 +92,10 @@ def test_skip_ocr(resources, outpdf):
def test_redo_ocr(resources, outpdf):
in_ = resources / 'graph_ocred.pdf'
before = PdfInfo(in_)
before = PdfInfo(in_, detailed_analysis=True)
out = outpdf
out = check_ocrmypdf(in_, out, '--redo-ocr')
after = PdfInfo(out)
after = PdfInfo(out, detailed_analysis=True)
assert before[0].has_text and after[0].has_text
assert (
before[0].get_textareas() != after[0].get_textareas()