Test convex hull of a square.
(self)
| 87 | assert jarvis_march([Point(0, 0), Point(1, 1)]) == [] |
| 88 | |
| 89 | def test_square(self) -> None: |
| 90 | """Test convex hull of a square.""" |
| 91 | p1, p2 = Point(0, 0), Point(1, 0) |
| 92 | p3, p4 = Point(1, 1), Point(0, 1) |
| 93 | hull = jarvis_march([p1, p2, p3, p4]) |
| 94 | assert len(hull) == 4 |
| 95 | assert all(p in hull for p in [p1, p2, p3, p4]) |
| 96 | |
| 97 | def test_duplicate_points(self) -> None: |
| 98 | """Test handling of duplicate points.""" |
nothing calls this directly
no test coverage detected