Test convex hull of a triangle.
(self)
| 38 | """Tests for the jarvis_march function.""" |
| 39 | |
| 40 | def test_triangle(self) -> None: |
| 41 | """Test convex hull of a triangle.""" |
| 42 | p1, p2, p3 = Point(1, 1), Point(2, 1), Point(1.5, 2) |
| 43 | hull = jarvis_march([p1, p2, p3]) |
| 44 | assert len(hull) == 3 |
| 45 | assert all(p in hull for p in [p1, p2, p3]) |
| 46 | |
| 47 | def test_collinear_points(self) -> None: |
| 48 | """Test that collinear points return empty hull.""" |
nothing calls this directly
no test coverage detected