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

Function test_output_stream_buffer

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

Source from the content-addressed store, hash-verified

2069
2070
2071def test_output_stream_buffer():
2072 data = b"some test data\n" * 10 + b"eof\n"
2073 buf = bytearray(len(data))
2074 stream = pa.output_stream(pa.py_buffer(buf))
2075 stream.write(data)
2076 assert buf == data
2077
2078 buf = bytearray(len(data))
2079 stream = pa.output_stream(memoryview(buf))
2080 stream.write(data)
2081 assert buf == data
2082
2083
2084def test_output_stream_duck_typing():

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected