(self, dtype)
| 4714 | assert expected == actual |
| 4715 | |
| 4716 | def test_pad(self, dtype): |
| 4717 | a = np.linspace(0, 5, 10).astype(dtype) * unit_registry.Pa |
| 4718 | b = np.linspace(-5, 0, 10).astype(dtype) * unit_registry.degK |
| 4719 | |
| 4720 | ds = xr.Dataset({"a": ("x", a), "b": ("x", b)}) |
| 4721 | units = extract_units(ds) |
| 4722 | |
| 4723 | expected = attach_units(strip_units(ds).pad(x=(2, 3)), units) |
| 4724 | actual = ds.pad(x=(2, 3)) |
| 4725 | |
| 4726 | assert_units_equal(expected, actual) |
| 4727 | assert_equal(expected, actual) |
| 4728 | |
| 4729 | @pytest.mark.parametrize( |
| 4730 | "func", |
nothing calls this directly
no test coverage detected