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

Function test_line

tests/test_annots.py:109–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108
109def test_line():
110 doc = pymupdf.open()
111 page = doc.new_page()
112 rect = page.rect + (100, 36, -100, -36)
113 cell = pymupdf.make_table(rect, rows=10)
114 for i in range(10):
115 annot = page.add_line_annot(cell[i][0].bl, cell[i][0].br)
116 annot.set_line_ends(i, i)
117 annot.update()
118 for i, annot in enumerate(page.annots()):
119 assert annot.line_ends == (i, i)
120 assert annot.type == (3, "Line")
121
122
123def test_square():

Callers

nothing calls this directly

Calls 5

new_pageMethod · 0.80
add_line_annotMethod · 0.80
set_line_endsMethod · 0.80
annotsMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…