()
| 393 | |
| 394 | @needs_cffi |
| 395 | def test_export_import_device_batch(): |
| 396 | check_export_import_batch( |
| 397 | "ArrowDeviceArray", |
| 398 | pa.RecordBatch._export_to_c_device, |
| 399 | pa.RecordBatch._import_from_c_device, |
| 400 | make_batch, |
| 401 | ) |
| 402 | |
| 403 | # verify exported struct |
| 404 | c_array = ffi.new("struct ArrowDeviceArray*") |
| 405 | ptr_array = int(ffi.cast("uintptr_t", c_array)) |
| 406 | batch = make_batch() |
| 407 | batch._export_to_c_device(ptr_array) |
| 408 | assert c_array.device_type == 1 # ARROW_DEVICE_CPU 1 |
| 409 | assert c_array.device_id == -1 |
| 410 | assert c_array.array.length == 2 |
| 411 | |
| 412 | |
| 413 | def _export_import_batch_reader(ptr_stream, reader_factory): |
nothing calls this directly
no test coverage detected