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

Function test_encoding_failure_note

xarray/tests/test_backends_common.py:54–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53@requires_scipy
54def test_encoding_failure_note():
55 # Create an arbitrary value that cannot be encoded in netCDF3
56 ds = xr.Dataset({"invalid": np.array([2**63 - 1], dtype=np.int64)})
57 f = io.BytesIO()
58 with pytest.raises(
59 ValueError,
60 match=re.escape(
61 "Raised while encoding variable 'invalid' with value <xarray.Variable"
62 ),
63 ):
64 ds.to_netcdf(f, engine="scipy")

Callers

nothing calls this directly

Calls 1

to_netcdfMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…