()
| 703 | |
| 704 | |
| 705 | def test_roundtrip_batch_reader_capsule(): |
| 706 | batch = make_batch() |
| 707 | |
| 708 | capsule = batch.__arrow_c_stream__() |
| 709 | assert PyCapsule_IsValid(capsule, b"arrow_array_stream") == 1 |
| 710 | imported_reader = pa.RecordBatchReader._import_from_c_capsule(capsule) |
| 711 | assert imported_reader.schema == batch.schema |
| 712 | assert imported_reader.read_next_batch().equals(batch) |
| 713 | with pytest.raises(StopIteration): |
| 714 | imported_reader.read_next_batch() |
| 715 | |
| 716 | |
| 717 | def test_roundtrip_chunked_array_capsule(): |
nothing calls this directly
no test coverage detected