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

Method test_pickle

xarray/tests/test_dask.py:204–215  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

202 assert expected == repr(self.lazy_var)
203
204 def test_pickle(self):
205 # Test that pickling/unpickling does not convert the dask
206 # backend to numpy
207 a1 = Variable(["x"], build_dask_array("x"))
208 a1.compute()
209 assert not a1._in_memory
210 assert kernel_call_count == 1
211 a2 = pickle.loads(pickle.dumps(a1))
212 assert kernel_call_count == 1
213 assert_identical(a1, a2)
214 assert not a1._in_memory
215 assert not a2._in_memory
216
217 def test_reduce(self):
218 u = self.eager_var

Callers

nothing calls this directly

Calls 4

computeMethod · 0.95
VariableClass · 0.90
assert_identicalFunction · 0.90
build_dask_arrayFunction · 0.85

Tested by

no test coverage detected