(pickle_module)
| 406 | |
| 407 | |
| 408 | def test_buffer_null_data(pickle_module): |
| 409 | null_buff = pa.foreign_buffer(address=0, size=0) |
| 410 | assert null_buff.to_pybytes() == b"" |
| 411 | assert null_buff.address == 0 |
| 412 | # ARROW-16048: we shouldn't expose a NULL address through the Python |
| 413 | # buffer protocol. |
| 414 | m = memoryview(null_buff) |
| 415 | assert m.tobytes() == b"" |
| 416 | assert pa.py_buffer(m).address != 0 |
| 417 | |
| 418 | check_buffer_pickling(null_buff, pickle_module) |
| 419 | |
| 420 | |
| 421 | def test_buffer_memoryview(pickle_module): |
nothing calls this directly
no test coverage detected