MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / test_3209

Function test_3209

tests/test_annots.py:379–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377 first_annot.next.type
378
379def test_3209():
380 pdf = pymupdf.Document(filetype="pdf")
381 page = pdf.new_page()
382 page.add_ink_annot([[(300,300), (400, 380), (350, 350)]])
383 n = 0
384 for annot in page.annots():
385 n += 1
386 assert annot.vertices == [[(300.0, 300.0), (400.0, 380.0), (350.0, 350.0)]]
387 assert n == 1
388 path = os.path.abspath(f'{__file__}/../../tests/test_3209_out.pdf')
389 pdf.save(path) # Check the output PDF that the annotation is correctly drawn
390
391def test_3863():
392 path_in = os.path.normpath(f'{__file__}/../../tests/resources/test_3863.pdf')

Callers

nothing calls this directly

Calls 4

new_pageMethod · 0.95
saveMethod · 0.95
add_ink_annotMethod · 0.80
annotsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…