MCPcopy Create free account
hub / github.com/numpy/numpy / test_pickling

Method test_pickling

numpy/core/tests/test__exceptions.py:14–18  ·  view source on GitHub ↗

Test that _ArrayMemoryError can be pickled

(self)

Source from the content-addressed store, hash-verified

12
13class TestArrayMemoryError:
14 def test_pickling(self):
15 """ Test that _ArrayMemoryError can be pickled """
16 error = _ArrayMemoryError((1023,), np.dtype(np.uint8))
17 res = pickle.loads(pickle.dumps(error))
18 assert res._total_size == error._total_size
19
20 def test_str(self):
21 e = _ArrayMemoryError((1023,), np.dtype(np.uint8))

Callers

nothing calls this directly

Calls 2

_ArrayMemoryErrorClass · 0.85
dtypeMethod · 0.45

Tested by

no test coverage detected