Fix test failures on pikepdf 3.2.0 + pybind11 2.8.0
When compiled without pybind11 2.8.0, pikepdf supplies a shim to implement pikepdf._ObjectMapping.values() which has subtly different semantics from a true dict-like objects; in particular it supports next(objectmap.values()) where a standard dict requires next(iter(objectmap.values()). pybind11 2.8.0 now implements .values() properly, meaning some misuses of protocol in ocrmypdf fail. If pybind11 < 2.8.0, pikepdf will continue to offer its shim. If pybind11 >= 2.8.0, pikepdf does not add its shim. Consequently no changes were needed in pikepdf. Closes #843
This commit is contained in:
@@ -87,4 +87,4 @@ def test_jpeg_in_jpeg_out(resources, outpdf):
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
)
|
||||
with pikepdf.open(outpdf) as pdf:
|
||||
assert next(pdf.pages[0].images.values()).Filter == pikepdf.Name.DCTDecode
|
||||
assert next(iter(pdf.pages[0].images.values())).Filter == pikepdf.Name.DCTDecode
|
||||
|
||||
Reference in New Issue
Block a user