(data, typ, pickle_module)
| 2462 | |
| 2463 | @pickle_test_parametrize |
| 2464 | def test_array_pickle(data, typ, pickle_module): |
| 2465 | # Allocate here so that we don't have any Arrow data allocated. |
| 2466 | # This is needed to ensure that allocator tests can be reliable. |
| 2467 | array = pa.array(data, type=typ) |
| 2468 | for proto in range(0, pickle_module.HIGHEST_PROTOCOL + 1): |
| 2469 | result = pickle_module.loads(pickle_module.dumps(array, proto)) |
| 2470 | assert array.equals(result) |
| 2471 | |
| 2472 | |
| 2473 | def test_array_pickle_dictionary(pickle_module): |