test_two_languages: use narrower test

This commit is contained in:
James R. Barlow
2020-06-12 14:33:02 -07:00
parent eeb44f78cc
commit 892db88f0e
2 changed files with 7 additions and 5 deletions
-5
View File
@@ -875,8 +875,3 @@ def test_image_dpi_not_image(caplog, resources, outpdf):
'tests/plugins/tesseract_noop.py',
)
assert '--image-dpi is being ignored' in caplog.text
def test_two_languages(resources, no_outpdf):
p, _, _ = run_ocrmypdf(resources / 'graph_ocred.pdf', no_outpdf, '-l', 'eng+deu')
assert p.returncode == ExitCode.already_done_ocr
+7
View File
@@ -272,3 +272,10 @@ def test_pagesegmode_warning(caplog):
plugin_manager = get_plugin_manager(opts.plugins)
vd._check_options(opts, plugin_manager, set())
assert 'disable OCR' in caplog.text
def test_two_languages():
with patch('ocrmypdf._exec.tesseract.has_textonly_pdf', return_value=True):
vd._check_options(
*make_opts_pm(language='fakelang1+fakelang2'), {'fakelang1', 'fakelang2'}
)