Skip to content

Commit

Permalink
add tests for the modification
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Jan 31, 2024
1 parent a6b7848 commit 8c8a51d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pint_xarray/tests/test_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@ def test_extract_units(self, type, units):
{"a": "K", "b": "hPa", "x": "m", "u": "s"},
id="Dataset",
),
pytest.param(
Dataset(coords={"t": ("t", [], {"units": "seconds since 2000-01-01"})}),
{},
id="datetime_unit",
),
),
)
def test_extract_unit_attributes(self, obj, expected):
Expand Down Expand Up @@ -546,6 +551,11 @@ def test_strip_units(self, obj, expected):
{"a": "K", "b": "hPa", "x": "m", "u": "s"},
id="Dataset",
),
pytest.param(
Dataset(coords={"t": ("t", [], {"units": "seconds since 2000-01-01"})}),
{},
id="datetime_unit",
),
),
)
def test_strip_unit_attributes(self, obj, expected):
Expand Down

0 comments on commit 8c8a51d

Please sign in to comment.