def test_point_distance(): p1 = Point() p2 = Point(2, 4) assert p1.distance(p2) == 4.47213595499958
def test_point_distance_exception(): with pytest.raises(TypeError): p1 = Point() p1.distance(dir)
def test_distance(): p1 = Point() p2 = Point(2.0, 4.0) assert p1.distance(p2) == 3.1622776601683795