MCPcopy
hub / github.com/pydata/xarray / test_transpose_error

Function test_transpose_error

xarray/tests/test_dataset.py:8398–8409  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8396
8397
8398def test_transpose_error() -> None:
8399 # Transpose dataset with list as argument
8400 # Should raise error
8401 ds = xr.Dataset({"foo": (("x", "y"), [[21]]), "bar": (("x", "y"), [[12]])})
8402
8403 with pytest.raises(
8404 TypeError,
8405 match=re.escape(
8406 "transpose requires dim to be passed as multiple arguments. Expected `'y', 'x'`. Received `['y', 'x']` instead"
8407 ),
8408 ):
8409 ds.transpose(["y", "x"]) # type: ignore[arg-type]

Callers

nothing calls this directly

Calls 1

transposeMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…