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

Function test_2355

tests/test_toc.py:85–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 f'{wt=}'
84
85def test_2355():
86
87 # Create a test PDF with toc.
88 doc = pymupdf.Document()
89 for _ in range(10):
90 doc.new_page(doc.page_count)
91 doc.set_toc([[1, 'test', 1], [1, 'test2', 5]])
92
93 path = 'test_2355.pdf'
94 doc.save(path)
95
96 # Open many times
97 for i in range(10):
98 with pymupdf.open(path) as new_doc:
99 new_doc.get_toc()
100
101 # Open once and read many times
102 with pymupdf.open(path) as new_doc:
103 for i in range(10):
104 new_doc.get_toc()
105
106def test_2788():
107 '''

Callers

nothing calls this directly

Calls 4

new_pageMethod · 0.95
set_tocMethod · 0.95
saveMethod · 0.95
get_tocMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…