Don't warn about --user-words in Tesseract 4.1 or later

This commit is contained in:
James R. Barlow
2019-07-27 02:14:59 -07:00
parent 6fbeb6347d
commit 5304c631ec
3 changed files with 21 additions and 4 deletions
+7 -2
View File
@@ -81,8 +81,13 @@ def test_optimizing(caplog):
def test_user_words(caplog):
vd.check_options_advanced(make_opts(user_words='foo'))
assert 'ignores --user-words' in caplog.text
with patch('ocrmypdf.exec.tesseract.version', return_value='4.0.0'):
vd.check_options_advanced(make_opts(user_words='foo'))
assert '4.0 ignores --user-words' in caplog.text
caplog.clear()
with patch('ocrmypdf.exec.tesseract.version', return_value='4.1.0'):
vd.check_options_advanced(make_opts(user_patterns='foo'))
assert '4.0 ignores --user-words' not in caplog.text
def test_pillow_options():