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

Function test_BufferReader_zero_size

python/pyarrow/tests/test_cuda.py:686–695  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

684
685
686def test_BufferReader_zero_size():
687 arr, cbuf = make_random_buffer(size=0, target='device')
688 reader = cuda.BufferReader(cbuf)
689 reader.seek(0)
690 data = reader.read()
691 assert len(data) == 0
692 assert reader.tell() == 0
693 buf2 = reader.read_buffer()
694 arr2 = np.frombuffer(buf2.copy_to_host(), dtype=np.uint8)
695 np.testing.assert_equal(arr, arr2)
696
697
698def make_recordbatch(length):

Callers

nothing calls this directly

Calls 6

lenFunction · 0.85
BufferReaderMethod · 0.80
seekMethod · 0.80
read_bufferMethod · 0.80
make_random_bufferFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected