Author: Matti Picus <[email protected]>
Branch: cpyext-pickle
Changeset: r84521:0682c3cebfa3
Date: 2016-05-19 22:36 +0300
http://bitbucket.org/pypy/pypy/changeset/0682c3cebfa3/
Log: add a failing test - PyCFunctionObject and friends cannot be pickled
diff --git a/pypy/module/cpyext/test/test_arraymodule.py
b/pypy/module/cpyext/test/test_arraymodule.py
--- a/pypy/module/cpyext/test/test_arraymodule.py
+++ b/pypy/module/cpyext/test/test_arraymodule.py
@@ -67,3 +67,11 @@
'\x02\0\0\0'
'\x03\0\0\0'
'\x04\0\0\0')
+
+ def test_pickle(self):
+ import pickle
+ module = self.import_module(name='array')
+ arr = module.array('i', [1,2,3,4])
+ s = pickle.dumps(arr)
+ rra = pickle.loads(s)
+ assert arr.tolist() == rra.tolist()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit