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

Method test_pickle_dataarray

xarray/tests/test_backends.py:640–645  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

638 assert_identical(expected, unpickled_ds)
639
640 def test_pickle_dataarray(self) -> None:
641 expected = Dataset({"foo": ("x", [42])})
642 with self.roundtrip(expected, allow_cleanup_failure=ON_WINDOWS) as roundtripped:
643 raw_pickle = pickle.dumps(roundtripped["foo"])
644 with pickle.loads(raw_pickle) as unpickled:
645 assert_identical(expected["foo"], unpickled)
646
647 def test_dataset_caching(self) -> None:
648 expected = Dataset({"foo": ("x", [5, 6, 7])})

Callers 1

test_pickle_dataarrayMethod · 0.45

Calls 3

roundtripMethod · 0.95
DatasetClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected