예제 #1
0
def test_point_is_ccw_false():
    p = Point()
    q = Point(1, 0)
    r = Point(1, 1)
    assert not r.is_ccw(q, p)
예제 #2
0
def test_point_is_ccw_colinear():
    p = Point()
    q = Point(1, 0)
    r = Point(2, 0)
    with pytest.raises(ColinearPoints):
        p.is_ccw(q, r)
예제 #3
0
def test_point_is_ccw_true():
    p = Point()
    q = Point(1, 0)
    r = Point(1, 1)
    assert p.is_ccw(q, r)