Skip to content

Commit

Permalink
tests/test_tesseract.py: avoid failure in sysinstall case.
Browse files Browse the repository at this point in the history
With sysinstall test, we install tesseract without 'eng' data.
  • Loading branch information
julian-smith-artifex-com committed Dec 5, 2024
1 parent 6ca763f commit 8376e31
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_tesseract.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ def test_3842():
partial_tp = page.get_textpage_ocr(flags=0, full=False)
except Exception as e:
print(f'test_3842(): received exception: {e}', flush=1)
assert 'No tessdata specified and Tesseract is not installed' in str(e)
if 'No tessdata specified and Tesseract is not installed' in str(e):
pass
elif 'Tesseract language initialisation failed' in str(e):
pass
else:
assert 0, f'Unexpected exception text: {str(e)=}'
else:
text = page.get_text(textpage=partial_tp)
print()
Expand Down

0 comments on commit 8376e31

Please sign in to comment.