MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / test_triangle

Function test_triangle

geometry/tests/test_graham_scan.py:42–53  ·  view source on GitHub ↗

Test with a triangle (3 points).

()

Source from the content-addressed store, hash-verified

40
41
42def 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
56def test_rectangle() -> None:

Callers

nothing calls this directly

Calls 2

PointClass · 0.90
graham_scanFunction · 0.90

Tested by

no test coverage detected