(self, request)
| 55 | |
| 56 | @pytest.fixture(params=["loaded", "new"]) |
| 57 | def dimensions_fixture(self, request): |
| 58 | image_file_path = test_file("monty-truth.png") |
| 59 | image = Image.from_file(image_file_path) |
| 60 | expected_cx, expected_cy = 1905000, 2717800 |
| 61 | |
| 62 | # case 1: image part is loaded by PartFactory w/no Image inst |
| 63 | if request.param == "loaded": |
| 64 | partname = PackURI("/word/media/image1.png") |
| 65 | content_type = CT.PNG |
| 66 | image_part = ImagePart.load(partname, content_type, image.blob, None) |
| 67 | # case 2: image part is newly created from image file |
| 68 | elif request.param == "new": |
| 69 | image_part = ImagePart.from_image(image, None) |
| 70 | |
| 71 | return image_part, expected_cx, expected_cy |
| 72 | |
| 73 | @pytest.fixture(params=["loaded", "new"]) |
| 74 | def filename_fixture(self, request, image_): |
nothing calls this directly
no test coverage detected