(self, func)
| 3284 | "func", [lambda x: x.clip(0, 1), lambda x: np.float64(1.0) * x, np.abs, abs] |
| 3285 | ) |
| 3286 | def test_propagate_attrs(self, func) -> None: |
| 3287 | da = DataArray(self.va) |
| 3288 | |
| 3289 | # test defaults |
| 3290 | assert func(da).attrs == da.attrs |
| 3291 | |
| 3292 | with set_options(keep_attrs=False): |
| 3293 | assert func(da).attrs == {} |
| 3294 | |
| 3295 | with set_options(keep_attrs=True): |
| 3296 | assert func(da).attrs == da.attrs |
| 3297 | |
| 3298 | def test_fillna(self) -> None: |
| 3299 | a = DataArray([np.nan, 1, np.nan, 3], coords={"x": range(4)}, dims="x") |
nothing calls this directly
no test coverage detected