Skip to content

Commit

Permalink
Improved test coverage for regridding.find_indices().
Browse files Browse the repository at this point in the history
  • Loading branch information
byrdie committed Dec 4, 2023
1 parent 62e60ab commit fa08ff1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions regridding/_find_indices/_tests/test_find_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,25 @@
(np.linspace(-1, 1, num=32),),
(np.linspace(-1, 1, num=64),),
),
pytest.param(
10 * (np.linspace(-1, 1, num=32),),
10 * (np.linspace(-1, 1, num=64),),
marks=pytest.mark.xfail,
),
],
)
@pytest.mark.parametrize(
argnames="method",
argvalues=[
"brute",
"searchsorted",
pytest.param("invalid method", marks=pytest.mark.xfail)
pytest.param("invalid method", marks=pytest.mark.xfail),
],
)
def test_find_indices_1d(
coordinates_input: tuple[np.ndarray],
coordinates_output: tuple[np.ndarray],
method: Literal["brute"],
method: Literal["brute","searchsorted"],
):
result = regridding.find_indices(
coordinates_input=coordinates_input,
Expand Down

0 comments on commit fa08ff1

Please sign in to comment.