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

Function test_redact3

tests/test_annots.py:200–211  ·  view source on GitHub ↗

Test for removing text and graphics.

()

Source from the content-addressed store, hash-verified

198
199
200def test_redact3():
201 """Test for removing text and graphics."""
202 if not hasattr(pymupdf, "mupdf"):
203 print("Not executing 'test_redact3' in classic")
204 return
205 filename = os.path.join(scriptdir, "resources", "symbol-list.pdf")
206 doc = pymupdf.open(filename)
207 page = doc[0]
208 page.add_redact_annot(page.rect)
209 page.apply_redactions()
210 assert not page.get_text("words")
211 assert not page.get_drawings()
212
213
214def test_redact4():

Callers

nothing calls this directly

Calls 4

add_redact_annotMethod · 0.80
apply_redactionsMethod · 0.80
get_drawingsMethod · 0.80
get_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…