summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJames R. Barlow <james@purplerock.ca>2022-08-01 02:47:39 -0700
committerJames R. Barlow <james@purplerock.ca>2022-08-01 02:47:39 -0700
commit30e4198f3a5f22cba9c91a73e2d960c0f8038553 (patch)
treeb87c0ef759907367654133e1d07687a561762fb9
parent8ca9fa4ade54517fd4125a1fdd916f93a57b03e9 (diff)
downloadocrmypdf-30e4198f3a5f22cba9c91a73e2d960c0f8038553.tar.gz
tests: fix test_validation when chi_sim not installedv13.7.0
-rw-r--r--tests/test_validation.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_validation.py b/tests/test_validation.py
index 03473704..570370d7 100644
--- a/tests/test_validation.py
+++ b/tests/test_validation.py
@@ -42,16 +42,16 @@ def make_opts(*args, **kwargs):
def test_hocr_notlatin_warning(caplog):
- # Bypass the test to see if the language is installed; we just want to pretend
- # that a non-Latin language is installed
- vd.check_options(
- *make_opts_pm(language='chi_sim', pdf_renderer='hocr', output_type='pdfa'),
+ vd.check_options_output(
+ make_opts_pm(language='chi_sim', pdf_renderer='hocr', output_type='pdfa')[0]
)
assert 'PDF renderer is known to cause' in caplog.text
def test_old_ghostscript(caplog):
- with patch('ocrmypdf._exec.ghostscript.version', return_value='9.19'):
+ with patch('ocrmypdf._exec.ghostscript.version', return_value='9.19'), patch(
+ 'ocrmypdf._exec.tesseract.get_languages', return_value={'eng', 'chi_sim'}
+ ):
vd.check_options(*make_opts_pm(language='chi_sim', output_type='pdfa'))
assert 'does not work correctly' in caplog.text