()
| 1878 | print(f'test_3886(): {rms_0=} {rms_1=}') |
| 1879 | |
| 1880 | def test_4415(): |
| 1881 | path = os.path.normpath(f'{__file__}/../../tests/resources/test_4415.pdf') |
| 1882 | path_out = os.path.normpath(f'{__file__}/../../tests/resources/test_4415_out.png') |
| 1883 | path_out_expected = os.path.normpath(f'{__file__}/../../tests/resources/test_4415_out_expected.png') |
| 1884 | with pymupdf.open(path) as document: |
| 1885 | page = document[0] |
| 1886 | rot = page.rotation |
| 1887 | orig = pymupdf.Point(100, 100) # apparent insertion point |
| 1888 | text = 'Text at Top-Left' |
| 1889 | mrot = page.derotation_matrix # matrix annihilating page rotation |
| 1890 | page.insert_text(orig * mrot, text, fontsize=60, rotate=rot) |
| 1891 | pixmap = page.get_pixmap() |
| 1892 | pixmap.save(path_out) |
| 1893 | rms = gentle_compare.pixmaps_rms(path_out_expected, path_out) |
| 1894 | assert rms == 0, f'{rms=}' |
| 1895 | |
| 1896 | def test_4466(): |
| 1897 | path = os.path.normpath(f'{__file__}/../../tests/test_4466.pdf') |
nothing calls this directly
no test coverage detected
searching dependent graphs…