()
| 736 | |
| 737 | |
| 738 | def test_roundtrip_batch_reader_capsule(): |
| 739 | batch = make_batch() |
| 740 | |
| 741 | capsule = batch.__arrow_c_stream__() |
| 742 | assert PyCapsule_IsValid(capsule, b"arrow_array_stream") == 1 |
| 743 | imported_reader = pa.RecordBatchReader._import_from_c_capsule(capsule) |
| 744 | assert imported_reader.schema == batch.schema |
| 745 | assert imported_reader.read_next_batch().equals(batch) |
| 746 | with pytest.raises(StopIteration): |
| 747 | imported_reader.read_next_batch() |
| 748 | |
| 749 | |
| 750 | def test_roundtrip_chunked_array_capsule(): |
nothing calls this directly
no test coverage detected