Skip to content

Commit fd2c897

Browse files
committed
also add a test for dataset
1 parent 90f8d55 commit fd2c897

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xarray/tests/test_dataset.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5028,6 +5028,13 @@ def test_count(self):
50285028
actual = ds.count()
50295029
assert_identical(expected, actual)
50305030

5031+
def test_apply_to_dataset(self):
5032+
def func(ds):
5033+
return Dataset(ds.data_vars, coords=ds.coords)
5034+
5035+
ds = create_test_data()
5036+
assert_identical(ds, ds.apply_to_dataset(func))
5037+
50315038
def test_map(self):
50325039
data = create_test_data()
50335040
data.attrs["foo"] = "bar"

0 commit comments

Comments
 (0)