()
| 56 | |
| 57 | |
| 58 | def test_array_serialization_empty(): |
| 59 | a = array() |
| 60 | # cPickle with protocol 2 required for Python 2.7 |
| 61 | # see http://pybind11.readthedocs.io/en/stable/advanced/classes.html#custom-constructors |
| 62 | ser = pickle.dumps(a, 2) |
| 63 | deser = pickle.loads(ser) |
| 64 | assert a == deser |
| 65 | |
| 66 | |
| 67 | def test_array_serialization(): |