Make optimize test do a little more

This commit is contained in:
James R. Barlow
2018-05-18 17:50:39 -07:00
parent 9425506c2a
commit 786a2ad65a
+7 -3
View File
@@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
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