Skip to content

Commit

Permalink
move kwargs test to separate parameter set
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvandermarel committed Jul 22, 2024
1 parent d2adec6 commit 4481014
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions pint_xarray/tests/test_accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,13 +1521,13 @@ def test_reindex_like(obj, units, other, other_units, expected, expected_units,
{"x": "dm", "y": "s"},
{"x": Quantity([1, 3, 5], "m"), "y": Quantity([0, 2], "min")},
xr.DataArray(
[[0, 1], [0, 5], [0, 0]],
[[np.nan, 1], [np.nan, 5], [np.nan, np.nan]],
dims=("x", "y"),
coords={"x": ("x", [1, 3, 5]), "y": ("y", [0, 2])},
),
{"x": "m", "y": "min"},
None,
{"bounds_error": False, "fill_value": 0},
None,
id="DataArray-compatible units",
),
pytest.param(
Expand Down Expand Up @@ -1562,6 +1562,24 @@ def test_reindex_like(obj, units, other, other_units, expected, expected_units,
None,
id="DataArray-data units",
),
pytest.param(
xr.DataArray(
[[0, 1], [2, 3], [4, 5]],
dims=("x", "y"),
coords={"x": ("x", [10, 20, 30]), "y": ("y", [60, 120])},
),
{"x": "dm", "y": "s"},
{"x": Quantity([1, 3, 5], "m"), "y": Quantity([0, 2], "min")},
xr.DataArray(
[[0, 1], [0, 5], [0, 0]],
dims=("x", "y"),
coords={"x": ("x", [1, 3, 5]), "y": ("y", [0, 2])},
),
{"x": "m", "y": "min"},
None,
{"bounds_error": False, "fill_value": 0},
id="DataArray-other parameters",
),
),
)
def test_interp(obj, units, indexers, expected, expected_units, error, kwargs):
Expand Down

0 comments on commit 4481014

Please sign in to comment.