Test insertion without scaling
()
| 232 | |
| 233 | |
| 234 | def test_htmlbox2(): |
| 235 | """Test insertion without scaling""" |
| 236 | if not hasattr(pymupdf, "mupdf"): |
| 237 | print("'test_htmlbox2' not executed in classic.") |
| 238 | return |
| 239 | |
| 240 | doc = pymupdf.open() |
| 241 | rect = pymupdf.Rect(100, 100, 200, 200) # large enough to hold text |
| 242 | page = doc.new_page() |
| 243 | bottoms = set() |
| 244 | for rot in (0, 90, 180, 270): |
| 245 | spare_height, scale = page.insert_htmlbox( |
| 246 | rect, "Hello, World!", scale_low=1, rotate=rot |
| 247 | ) |
| 248 | assert scale == 1 |
| 249 | assert 0 < spare_height < rect.height |
| 250 | bottoms.add(spare_height) |
| 251 | assert len(bottoms) == 1 # same result for all rotations |
| 252 | |
| 253 | |
| 254 | def test_htmlbox3(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…