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

Function test_allocate_buffer

python/pyarrow/tests/test_io.py:662–672  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

660
661
662def test_allocate_buffer():
663 buf = pa.allocate_buffer(100)
664 assert buf.size == 100
665 assert buf.is_mutable
666 assert buf.parent is None
667
668 bit = b'abcde'
669 writer = pa.FixedSizeBufferWriter(buf)
670 writer.write(bit)
671
672 assert buf.to_pybytes()[:5] == bit
673
674
675def test_allocate_buffer_resizable():

Callers

nothing calls this directly

Calls 2

FixedSizeBufferWriterMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected