()
| 559 | |
| 560 | |
| 561 | def test_4445(): |
| 562 | if os.environ.get('PYODIDE_ROOT'): |
| 563 | print('test_4445(): not running on Pyodide - cannot run child processes.') |
| 564 | return |
| 565 | print() |
| 566 | # Test case is large so we download it instead of having it in PyMuPDF |
| 567 | # git. We put it in `cache/` directory do it is not removed by `git clean` |
| 568 | # (unless `-d` is specified). |
| 569 | import util |
| 570 | path = util.download( |
| 571 | 'https://github.com/user-attachments/files/19738242/ss.pdf', |
| 572 | 'test_4445.pdf', |
| 573 | size=2671185, |
| 574 | ) |
| 575 | with pymupdf.open(path) as document: |
| 576 | page = document[0] |
| 577 | pixmap = page.get_pixmap() |
| 578 | print(f'{pixmap.width=}') |
| 579 | print(f'{pixmap.height=}') |
| 580 | assert (pixmap.width, pixmap.height) == (792, 612) |
| 581 | if 0: |
| 582 | path_pixmap = f'{path}.png' |
| 583 | pixmap.save(path_pixmap) |
| 584 | print(f'Have created {path_pixmap=}') |
| 585 | wt = pymupdf.TOOLS.mupdf_warnings() |
| 586 | print(f'{wt=}') |
| 587 | assert wt == 'broken xref subsection, proceeding anyway.\nTrailer Size is off-by-one. Ignoring.' |
| 588 | |
| 589 | |
| 590 | def test_3806(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…