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

Function test_ipc_stream_no_batches

python/pyarrow/tests/test_ipc.py:1032–1047  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1030
1031
1032def test_ipc_stream_no_batches():
1033 # ARROW-2307
1034 table = pa.Table.from_arrays([pa.array([1, 2, 3, 4]),
1035 pa.array(['foo', 'bar', 'baz', 'qux'])],
1036 names=['a', 'b'])
1037
1038 sink = pa.BufferOutputStream()
1039 with pa.ipc.new_stream(sink, table.schema):
1040 pass
1041
1042 source = sink.getvalue()
1043 with pa.ipc.open_stream(source) as reader:
1044 result = reader.read_all()
1045
1046 assert result.schema.equals(table.schema)
1047 assert len(result) == 0
1048
1049
1050@pytest.mark.pandas

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
BufferOutputStreamMethod · 0.80
equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected