def test_calculate_not_slow_down_when_circling_the_road(): my_car = Car() car_in_front = Car() my_car.speed = 30 my_car.location = 980 car_in_front.speed = 25 car_in_front.location = 20 assert my_car.calculate_slow_down(car_in_front) == False
def test_calculate_slow_down(): my_car = Car() car_in_front = Car() my_car.speed = 30 my_car.location = 80 car_in_front.speed = 25 car_in_front.location = 100 assert my_car.calculate_slow_down(car_in_front) == True