()
| 1174 | |
| 1175 | |
| 1176 | def test_write_empty_ipc_file(): |
| 1177 | # ARROW-3894: IPC file was not being properly initialized when no record |
| 1178 | # batches are being written |
| 1179 | schema = pa.schema([('field', pa.int64())]) |
| 1180 | |
| 1181 | sink = pa.BufferOutputStream() |
| 1182 | with pa.ipc.new_file(sink, schema): |
| 1183 | pass |
| 1184 | |
| 1185 | buf = sink.getvalue() |
| 1186 | with pa.RecordBatchFileReader(pa.BufferReader(buf)) as reader: |
| 1187 | table = reader.read_all() |
| 1188 | assert len(table) == 0 |
| 1189 | assert table.schema.equals(schema) |
| 1190 | |
| 1191 | |
| 1192 | def test_py_record_batch_reader(): |
nothing calls this directly
no test coverage detected