()
| 1030 | |
| 1031 | |
| 1032 | def 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 |
nothing calls this directly
no test coverage detected