()
| 398 | |
| 399 | |
| 400 | def test_3448(): |
| 401 | path = os.path.normpath(f'{__file__}/../../tests/resources/test_3448.pdf') |
| 402 | with pymupdf.open(path) as document: |
| 403 | page = document[0] |
| 404 | pixmap = page.get_pixmap(alpha=False, dpi=150) |
| 405 | path_out = f'{path}.png' |
| 406 | pixmap.save(path_out) |
| 407 | print(f'Have written to: {path_out}') |
| 408 | path_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_3448.pdf-expected.png') |
| 409 | pixmap_expected = pymupdf.Pixmap(path_expected) |
| 410 | rms = gentle_compare.pixmaps_rms(pixmap, pixmap_expected) |
| 411 | diff = gentle_compare.pixmaps_diff(pixmap_expected, pixmap) |
| 412 | path_diff = os.path.normpath(f'{__file__}/../../tests/test_3448-diff.png') |
| 413 | diff.save(path_diff) |
| 414 | print(f'{rms=}') |
| 415 | assert rms == 0 |
| 416 | |
| 417 | |
| 418 | def test_3854(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…