From 786a2ad65a7069f6416d99c38a42870b3b9cb826 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 18 May 2018 17:50:39 -0700 Subject: [PATCH] Make optimize test do a little more --- tests/test_optimize.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_optimize.py b/tests/test_optimize.py index c0a4517a..0a30dce2 100644 --- a/tests/test_optimize.py +++ b/tests/test_optimize.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with OCRmyPDF. If not, see . +from pathlib import Path + import pytest import pikepdf @@ -22,7 +24,9 @@ import pikepdf from ocrmypdf import _optimize as opt -def test_multipage(resources, outpdf): - opt.main(resources / 'multipage.pdf', outpdf, level=3) - +@pytest.mark.parametrize('pdf', ['multipage.pdf', 'palette.pdf']) +def test_basic(resources, pdf, outpdf): + infile = resources / pdf + opt.main(infile, outpdf, level=3) + assert Path(outpdf).stat().st_size <= Path(infile).stat().st_size