MCPcopy Index your code
hub / github.com/pydata/xarray / test_dataset_number_math

Method test_dataset_number_math

xarray/tests/test_dataset.py:6617–6628  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6615 return ds
6616
6617 def test_dataset_number_math(self) -> None:
6618 ds = self.make_example_math_dataset()
6619
6620 assert_identical(ds, +ds)
6621 assert_identical(ds, ds + 0)
6622 assert_identical(ds, 0 + ds)
6623 assert_identical(ds, ds + np.array(0))
6624 assert_identical(ds, np.array(0) + ds)
6625
6626 actual = ds.copy(deep=True)
6627 actual += 0
6628 assert_identical(ds, actual)
6629
6630 # casting nan warns
6631 @pytest.mark.filterwarnings("ignore:invalid value encountered in cast")

Callers

nothing calls this directly

Calls 3

assert_identicalFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected