(self, create_test_datatree: Callable[[], DataTree])
| 1833 | assert actual["arr_with_attrs"].attrs == dict(x=1, y=2) |
| 1834 | |
| 1835 | def test_kwargs(self, create_test_datatree: Callable[[], DataTree]) -> None: |
| 1836 | dt = create_test_datatree() |
| 1837 | |
| 1838 | def f(tree: DataTree, *, x: int, y: int, z: int) -> DataTree: |
| 1839 | return tree.assign( |
| 1840 | arr_with_attrs=xr.Variable("dim0", [], attrs=dict(x=x, y=y, z=z)) |
| 1841 | ) |
| 1842 | |
| 1843 | attrs = {"x": 1, "y": 2, "z": 3} |
| 1844 | |
| 1845 | actual = dt.pipe(f, **attrs) |
| 1846 | assert actual["arr_with_attrs"].attrs == attrs |
| 1847 | |
| 1848 | def test_args_kwargs(self, create_test_datatree: Callable[[], DataTree]) -> None: |
| 1849 | dt = create_test_datatree() |
nothing calls this directly
no test coverage detected