Document need for pdfinfo to be pickleable

This commit is contained in:
James R. Barlow
2018-05-24 22:24:13 -07:00
parent 68d8642988
commit 0a04a60f69
+9
View File
@@ -146,3 +146,12 @@ def test_oversized_page(resources):
pdf = pdfinfo.PdfInfo(resources / 'poster.pdf')
image = pdf[0].images[0]
assert image.width * image.xres > 200, "this is supposed to be oversized"
def test_pickle(resources):
# For multiprocessing we must be able to pickle our information - if
# this fails then we are probably storing some unpickleabe pikepdf or
# other external data around
filename = resources / 'formxobject.pdf'
pdf = pdfinfo.PdfInfo(filename)
pickle.dumps(pdf)