Skip to content

Commit 866b39e

Browse files
committed
add round trip pickle test
1 parent 4933969 commit 866b39e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

numpy/core/tests/test__exceptions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,9 @@ def test__total_size(self):
4848

4949
class TestUFuncNoLoopError:
5050
def test_pickling(self):
51-
""" Test that _UFuncNoLoopError can be pickled """
51+
""" Test that _UFuncNoLoopError, _ArrayMemoryError can be pickled """
5252
assert isinstance(pickle.dumps(_UFuncNoLoopError), bytes)
53+
54+
error = _ArrayMemoryError((1023,), np.dtype(np.uint8))
55+
res = pickle.loads(pickle.dumps(error))
56+
assert res._total_size == error._total_size

0 commit comments

Comments
 (0)