()
| 116 | |
| 117 | |
| 118 | def test_custom_engine() -> None: |
| 119 | expected = xr.Dataset( |
| 120 | dict(a=2 * np.arange(5)), coords=dict(x=("x", np.arange(5), dict(units="s"))) |
| 121 | ) |
| 122 | |
| 123 | class CustomBackend(xr.backends.BackendEntrypoint): |
| 124 | def open_dataset( |
| 125 | self, |
| 126 | filename_or_obj, |
| 127 | drop_variables=None, |
| 128 | **kwargs, |
| 129 | ) -> xr.Dataset: |
| 130 | return expected.copy(deep=True) |
| 131 | |
| 132 | actual = xr.open_dataset("fake_filename", engine=CustomBackend) |
| 133 | assert_identical(expected, actual) |
| 134 | |
| 135 | |
| 136 | def test_multiindex() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…