MCPcopy Index your code
hub / github.com/pydata/xarray / test_encode_decode

Function test_encode_decode

xarray/tests/test_accessor_str.py:2418–2423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2416
2417
2418def test_encode_decode() -> None:
2419 data = xr.DataArray(["a", "b", "a\xe4"])
2420 encoded = data.str.encode("utf-8")
2421 decoded = encoded.str.decode("utf-8")
2422 assert data.dtype == decoded.dtype
2423 assert_equal(data, decoded)
2424
2425
2426def test_encode_decode_errors() -> None:

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…