Skip to content

Commit 8376e31

Browse files
tests/test_tesseract.py: avoid failure in sysinstall case.
With sysinstall test, we install tesseract without 'eng' data.
1 parent 6ca763f commit 8376e31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_tesseract.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ def test_3842():
102102
partial_tp = page.get_textpage_ocr(flags=0, full=False)
103103
except Exception as e:
104104
print(f'test_3842(): received exception: {e}', flush=1)
105-
assert 'No tessdata specified and Tesseract is not installed' in str(e)
105+
if 'No tessdata specified and Tesseract is not installed' in str(e):
106+
pass
107+
elif 'Tesseract language initialisation failed' in str(e):
108+
pass
109+
else:
110+
assert 0, f'Unexpected exception text: {str(e)=}'
106111
else:
107112
text = page.get_text(textpage=partial_tp)
108113
print()

0 commit comments

Comments
 (0)