From 36cfe8a94dccb9d9a4199f97cbdcfd87db11824d Mon Sep 17 00:00:00 2001 From: Ryuichi Arafune Date: Mon, 25 Mar 2024 11:09:47 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_xarray_extensions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_xarray_extensions.py b/tests/test_xarray_extensions.py index 05f6a93e..7eb11459 100644 --- a/tests/test_xarray_extensions.py +++ b/tests/test_xarray_extensions.py @@ -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