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

Function test_coder_roundtrip

xarray/tests/test_coding.py:90–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88
89# TODO(shoyer): parameterize when we have more coders
90def test_coder_roundtrip() -> None:
91 original = xr.Variable(("x",), [0.0, np.nan, 1.0])
92 coder = variables.CFMaskCoder()
93 roundtripped = coder.decode(coder.encode(original))
94 assert_identical(original, roundtripped)
95
96
97@pytest.mark.parametrize("dtype", ["u1", "u2", "i1", "i2", "f2", "f4"])

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
encodeMethod · 0.95
assert_identicalFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…