def test_find_intersection_downward_angle() -> None:
"""Test with normal downward angle."""
x_road = np.array([0, 10, 20, 30], dtype=np.float64)
y_road = np.array([0, 2, 4, 6], dtype=np.float64)
x, y, dist = find_intersection(x_road, y_road, -10.0)
assert x is not None
assert dist > 0
def test_find_intersection_empty_road() -> None:
"""Test with empty road arrays."""
x_road = np.array([], dtype=np.float64)
y_road = np.array([], dtype=np.float64)
x, y, dist = find_intersection(x_road, y_road, -10.0)
assert x is None
Value: 80% of boilerplate written instantly! 