()
| 366 | |
| 367 | |
| 368 | def test_3848(): |
| 369 | if os.environ.get('PYMUPDF_RUNNING_ON_VALGRIND') == '1': |
| 370 | # Takes 40m on Github. |
| 371 | print(f'test_3848(): not running on valgrind because very slow.', flush=1) |
| 372 | return |
| 373 | if platform.python_implementation() == 'GraalVM': |
| 374 | print(f'test_3848(): Not running because slow on GraalVM.') |
| 375 | return |
| 376 | path = os.path.normpath(f'{__file__}/../../tests/resources/test_3848.pdf') |
| 377 | with pymupdf.open(path) as document: |
| 378 | for i in range(len(document)): |
| 379 | page = document.load_page(i) |
| 380 | print(f'{page=}.') |
| 381 | for annot in page.get_drawings(): |
| 382 | if page.get_textbox(annot['rect']): |
| 383 | rect = annot['rect'] |
| 384 | pixmap = page.get_pixmap(clip=rect) |
| 385 | color_bytes = pixmap.color_topusage() |
| 386 | |
| 387 | |
| 388 | def test_3994(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…