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

Function test_page_links_generator

tests/test_page_links.py:6–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def test_page_links_generator():
7 # open some arbitrary PDF
8 path = os.path.abspath(f"{__file__}/../../tests/resources/2.pdf")
9 doc = pymupdf.open(path)
10
11 # select an arbitrary page
12 page = doc[-1]
13
14 # iterate over pages.links
15 link_generator = page.links()
16 links = list(link_generator)
17 assert len(links) == 7

Callers

nothing calls this directly

Calls 1

linksMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…