()
| 52 | |
| 53 | @requires_scipy |
| 54 | def 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") |
nothing calls this directly
no test coverage detected
searching dependent graphs…