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

Function test_roundtrip_chunked_array_capsule

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

Source from the content-addressed store, hash-verified

715
716
717def test_roundtrip_chunked_array_capsule():
718 chunked = pa.chunked_array([pa.array(["a", "b", "c"])])
719
720 capsule = chunked.__arrow_c_stream__()
721 assert PyCapsule_IsValid(capsule, b"arrow_array_stream") == 1
722 imported_chunked = pa.ChunkedArray._import_from_c_capsule(capsule)
723 assert imported_chunked.type == chunked.type
724 assert imported_chunked == chunked
725
726
727def test_roundtrip_chunked_array_capsule_requested_schema():

Callers

nothing calls this directly

Calls 4

chunked_arrayMethod · 0.80
PyCapsule_IsValidFunction · 0.70
arrayMethod · 0.45
__arrow_c_stream__Method · 0.45

Tested by

no test coverage detected