mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2026-05-03 12:13:47 -04:00
Fix Ghostscript tests after default output type changed to 'auto'
- Add --output-type pdfa to tests that exercise Ghostscript-specific behavior (test_gs_render_failure, test_ghostscript_pdfa_failure, test_ghostscript_mandatory_color_conversion) - Add Gs106WarningFilter to suppress expected Ghostscript 10.6.x JPEG encoding warning in test logs
This commit is contained in:
@@ -84,6 +84,8 @@ def test_gs_render_failure(resources, outpdf, caplog):
|
||||
exitcode = run_ocrmypdf_api(
|
||||
resources / 'blank.pdf',
|
||||
outpdf,
|
||||
'--output-type',
|
||||
'pdfa', # Required to trigger Ghostscript PDF/A generation
|
||||
'--plugin',
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
'--plugin',
|
||||
@@ -110,6 +112,8 @@ def test_ghostscript_pdfa_failure(resources, outpdf, caplog):
|
||||
exitcode = run_ocrmypdf_api(
|
||||
resources / 'francais.pdf',
|
||||
outpdf,
|
||||
'--output-type',
|
||||
'pdfa', # Required to trigger Ghostscript PDF/A generation
|
||||
'--plugin',
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
'--plugin',
|
||||
@@ -136,6 +140,8 @@ def test_ghostscript_mandatory_color_conversion(resources, outpdf):
|
||||
check_ocrmypdf(
|
||||
resources / 'jbig2_baddevicen.pdf',
|
||||
outpdf,
|
||||
'--output-type',
|
||||
'pdfa', # Required to trigger Ghostscript PDF/A generation
|
||||
'--plugin',
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user