def test_car_pull_push_out(): road = Road([[[None, None, None], [None, None, None], [None, None, None]], [[None, None, None], [None, None, None], [None, None, None]]]) road.push_car_out(0, Car(Directions.BOTTOM, TurnDirection.LEFT)) arr = np.array(road.out_lanes) assert len(arr[arr != np.array(None)]) == 1 assert arr[0][0] is not None and isinstance(arr[0][0], Car) for _ in range(10): road.push_car_out(0, Car(Directions.BOTTOM, TurnDirection.LEFT)) arr = np.array(road.out_lanes) assert len(arr[arr != np.array(None)]) == 1 assert arr[0][0] is not None and isinstance(arr[0][0], Car) road.push_car_out(1, Car(Directions.BOTTOM, TurnDirection.LEFT)) arr = np.array(road.out_lanes) assert len(arr[arr != np.array(None)]) == 2 assert arr[0][0] is not None and isinstance(arr[0][0], Car) and arr[1][0] is not None and isinstance(arr[1][0], Car)