(self, dtype)
| 4339 | assert_equal(expected, actual) |
| 4340 | |
| 4341 | def test_dropna(self, dtype): |
| 4342 | array1 = ( |
| 4343 | create_nan_array([1.4, np.nan, 2.3, np.nan, np.nan, 9.1], dtype) |
| 4344 | * unit_registry.degK |
| 4345 | ) |
| 4346 | array2 = ( |
| 4347 | create_nan_array([4.3, 9.8, 7.5, np.nan, 8.2, np.nan], dtype) |
| 4348 | * unit_registry.Pa |
| 4349 | ) |
| 4350 | ds = xr.Dataset({"a": ("x", array1), "b": ("x", array2)}) |
| 4351 | units = extract_units(ds) |
| 4352 | |
| 4353 | expected = attach_units(strip_units(ds).dropna(dim="x"), units) |
| 4354 | actual = ds.dropna(dim="x") |
| 4355 | |
| 4356 | assert_units_equal(expected, actual) |
| 4357 | assert_equal(expected, actual) |
| 4358 | |
| 4359 | @pytest.mark.parametrize( |
| 4360 | "unit", |
nothing calls this directly
no test coverage detected