Test with a triangle (3 points).
()
| 40 | |
| 41 | |
| 42 | def test_triangle() -> None: |
| 43 | """Test with a triangle (3 points).""" |
| 44 | p1 = Point(1, 1) |
| 45 | p2 = Point(2, 1) |
| 46 | p3 = Point(1.5, 2) |
| 47 | points = [p1, p2, p3] |
| 48 | hull = graham_scan(points) |
| 49 | |
| 50 | assert len(hull) == 3 |
| 51 | assert p1 in hull |
| 52 | assert p2 in hull |
| 53 | assert p3 in hull |
| 54 | |
| 55 | |
| 56 | def test_rectangle() -> None: |
nothing calls this directly
no test coverage detected