Fix remaining 3.4/3.5 regressions

This commit is contained in:
James R. Barlow
2017-01-26 17:53:27 -08:00
parent 1976dc6f30
commit b889a89c36
3 changed files with 11 additions and 9 deletions
+4 -3
View File
@@ -20,7 +20,7 @@ import sys
@pytest.fixture
def blank_hocr(tmpdir):
filename = Path(str(tmpdir)) / "blank.hocr"
with open(filename, 'w') as f:
with open(str(filename), 'w') as f:
f.write(HOCR_TEMPLATE)
return filename
@@ -31,8 +31,9 @@ def test_mono_image(blank_hocr, outdir):
im.putpixel((n, n), 1)
im.save(outdir / 'mono.tif', format='TIFF')
hocr = hocrtransform.HocrTransform(blank_hocr, 300)
hocr.to_pdf(str(outdir / 'mono.pdf'), imageFileName=outdir / 'mono.tif')
hocr = hocrtransform.HocrTransform(str(blank_hocr), 300)
hocr.to_pdf(
str(outdir / 'mono.pdf'), imageFileName=str(outdir / 'mono.tif'))
qpdf.check(str(outdir / 'mono.pdf'))