@pytest.mark.parametrize('start,end,ds,expected_points', [([[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0], [300, 0, 0]], 50, 7), ([[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0], [50, 0, 0]], 50, 2)])
def test_linear_interpolation(start, end, ds, expected_points):
    start = get_tform(*start)
    end = get_tform(*end)
    interpolated_tforms = list(linear_interpolation(start, end, ds=ds))
    helper_spatial_interpolation_test(interpolated_tforms, start, end, expected_points)
    if (expected_points > 2):
        for i in range((expected_points - 1)):
            ds_actual = np.linalg.norm((interpolated_tforms[(i + 1)][0:3, 3] - interpolated_tforms[i][0:3, 3]))
            assert (pytest.approx(ds, rel=0.1) == ds_actual)
@pytest.mark.parametrize('start,end,ds,expected_points', [([[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0], [300, 0, 0]], 50, 7), ([[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]], [[0, 0, 0], [0, 0, 0], [0, 0, 0], [50, 0, 0]], 50, 2)])
def test_linear_interpolation(start, end, ds, expected_points):
    start = get_tform(*start)
    end = get_tform(*end)
    interpolated_tforms = list(linear_interpolation(start, end, ds=ds))
    helper_spatial_interpolation_test(interpolated_tforms, start, end, expected_points)
    if (expected_points > 2):
        for i in range((expected_points - 1)):
            ds_actual = np.linalg.norm((interpolated_tforms[(i + 1)][0:3, 3] - interpolated_tforms[i][0:3, 3]))
            assert (pytest.approx(ds, rel=0.1) == ds_actual)