()
| 16 | |
| 17 | |
| 18 | def test_image_bbox(): |
| 19 | page = doc[0] |
| 20 | imglist = page.get_images(True) |
| 21 | bbox_list = [] |
| 22 | for item in imglist: |
| 23 | bbox_list.append(page.get_image_bbox(item, transform=False)) |
| 24 | infos = page.get_image_info(xrefs=True) |
| 25 | match = False |
| 26 | for im in infos: |
| 27 | bbox1 = im["bbox"] |
| 28 | match = False |
| 29 | for bbox2 in bbox_list: |
| 30 | abs_bbox = (bbox2 - bbox1).norm() |
| 31 | if abs_bbox < 1e-4: |
| 32 | match = True |
| 33 | break |
| 34 | assert match |
| 35 | |
| 36 | |
| 37 | def test_bboxlog(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…