Assert that annot contents cleaning actually is invoked.
()
| 111 | |
| 112 | |
| 113 | def test_annot_clean_contents(): |
| 114 | """Assert that annot contents cleaning actually is invoked.""" |
| 115 | doc = pymupdf.open() |
| 116 | page = doc.new_page() |
| 117 | annot = page.add_highlight_annot((10, 10, 20, 20)) |
| 118 | |
| 119 | # the annotation appearance will not start with command b"q" |
| 120 | |
| 121 | |
| 122 | # invoke appearance stream cleaning and reformatting |
| 123 | annot.clean_contents() |
| 124 | |
| 125 | # appearance stream should now indeed start with command b"q" |
| 126 | assert annot._getAP().startswith(b"q") == True |
| 127 | |
| 128 | |
| 129 | def test_config(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…