MCPcopy Create free account
hub / github.com/apache/arrow / test_roundtrip_batch_reader_capsule

Function test_roundtrip_batch_reader_capsule

python/pyarrow/tests/test_cffi.py:705–714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

703
704
705def 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
717def test_roundtrip_chunked_array_capsule():

Callers

nothing calls this directly

Calls 4

make_batchFunction · 0.85
equalsMethod · 0.80
PyCapsule_IsValidFunction · 0.70
__arrow_c_stream__Method · 0.45

Tested by

no test coverage detected