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

Method test_pickle

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

Source from the content-addressed store, hash-verified

630 assert_identical(expected, computed)
631
632 def test_pickle(self) -> None:
633 expected = Dataset({"foo": ("x", [42])})
634 with self.roundtrip(expected, allow_cleanup_failure=ON_WINDOWS) as roundtripped:
635 # Windows doesn't like reopening an already open file
636 raw_pickle = pickle.dumps(roundtripped)
637 with pickle.loads(raw_pickle) as unpickled_ds:
638 assert_identical(expected, unpickled_ds)
639
640 def test_pickle_dataarray(self) -> None:
641 expected = Dataset({"foo": ("x", [42])})

Callers 1

test_pickleMethod · 0.45

Calls 3

roundtripMethod · 0.95
DatasetClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected