Exemple #1
0
def test_not_zeroed_points_correct_distance():
    station = Station(Point(5, 5), 10)
    p2 = Point(10, 10)
    assert round(station.distance(p2), 4) == 7.0711
Exemple #2
0
def test_same_point_zero_distance():
    station = Station(Point(0, 0), 10)
    p2 = Point(0, 0)
    assert station.distance(p2) == 0
Exemple #3
0
def test_different_points_correct_distance():
    station = Station(Point(0, 0), 10)
    p2 = Point(10, 10)
    assert round(station.distance(p2), 4) == 14.1421