()
| 292 | |
| 293 | |
| 294 | def test_quad(): |
| 295 | r = pymupdf.Rect(10, 10, 20, 20) |
| 296 | q = r.quad |
| 297 | assert q.is_rectangular |
| 298 | assert not q.is_empty |
| 299 | assert q.is_convex |
| 300 | q *= pymupdf.Matrix(1, 1).preshear(2, 3) |
| 301 | assert not q.is_rectangular |
| 302 | assert not q.is_empty |
| 303 | assert q.is_convex |
| 304 | assert r.tl not in q |
| 305 | assert r not in q |
| 306 | assert r.quad not in q |
| 307 | failed = False |
| 308 | try: |
| 309 | q[5] = pymupdf.Point() |
| 310 | except: |
| 311 | failed = True |
| 312 | assert failed |
| 313 | |
| 314 | failed = False |
| 315 | try: |
| 316 | q /= (1, 0, 1, 0, 1, 0) |
| 317 | except: |
| 318 | failed = True |
| 319 | assert failed |
| 320 | |
| 321 | |
| 322 | def test_pageboxes(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…