test_two_languages: use narrower test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user