Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
arafune committed Mar 25, 2024
1 parent 865ca55 commit 36cfe8a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_xarray_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ def test_short_history(self, dataarray_cut: xr.DataArray) -> None:
assert history[1] == "filesystem"


def test_for_symmetry_points(dataset_cut: xr.Dataset) -> None:
"""Test around symmetry_points."""
dataset_cut.attrs["symmetry_points"] = {"G": {"phi": dataset_cut.attrs["phi_offset"]}}
sym_points = dataset_cut.S.iter_own_symmetry_points
assert ("G", {"phi": 0.405}) == next(sym_points)
with pytest.raises(StopIteration):
next(sym_points)


def test_select_around(dataarray_cut: xr.DataArray) -> None:
"""Test for select_around."""
data_1 = dataarray_cut.S.select_around(points={"phi": 0.30}, radius={"phi": 0.05}).values
Expand Down

0 comments on commit 36cfe8a

Please sign in to comment.