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

Method test_dataset_diff_n1_label

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

Source from the content-addressed store, hash-verified

6839 assert_equal(expected, actual)
6840
6841 def test_dataset_diff_n1_label(self) -> None:
6842 ds = Dataset({"foo": ("x", [5, 5, 6, 6])}, {"x": [0, 1, 2, 3]})
6843 actual = ds.diff("x", label="lower")
6844 expected = Dataset({"foo": ("x", [0, 1, 0])}, {"x": [0, 1, 2]})
6845 assert_equal(expected, actual)
6846
6847 actual = ds.diff("x", label="upper")
6848 expected = Dataset({"foo": ("x", [0, 1, 0])}, {"x": [1, 2, 3]})
6849 assert_equal(expected, actual)
6850
6851 def test_dataset_diff_n1(self) -> None:
6852 ds = create_test_data(seed=1)

Callers

nothing calls this directly

Calls 3

diffMethod · 0.95
DatasetClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected