MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / test_4412

Function test_4412

tests/test_insertpdf.py:305–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303test_4412_path = os.path.normpath(f'{__file__}/../../tests/resources/test_4412.pdf')
304
305def test_4412():
306 # This tests whether a page from a PDF containing widgets found in the wild
307 # can be inserted into a new document with default options (widget=True)
308 # and widget=False.
309 print()
310 for widget in True, False:
311 print(f'{widget=}', flush=1)
312 with pymupdf.open(test_4412_path) as doc, pymupdf.open() as new_doc:
313 buf = io.BytesIO()
314 new_doc.insert_pdf(doc, from_page=1, to_page=1)
315 new_doc.save(buf)
316 assert len(new_doc)==1
317
318
319def test_4571():

Callers

nothing calls this directly

Calls 2

insert_pdfMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…