(output, expected_num_chunks: int)
| 78 | |
| 79 | |
| 80 | def _check_output(output, expected_num_chunks: int): |
| 81 | stream = pa.BufferReader(output) if isinstance(output, pa.Buffer) else pa.memory_map(output) |
| 82 | f = pa.ipc.open_stream(stream) |
| 83 | pa_table: pa.Table = f.read_all() |
| 84 | assert len(pa_table.to_batches()) == expected_num_chunks |
| 85 | assert pa_table.to_pydict() == {"col_1": ["foo", "bar"], "col_2": [1, 2]} |
| 86 | del pa_table |
| 87 | |
| 88 | |
| 89 | @pytest.mark.parametrize("writer_batch_size", [None, 1, 10]) |
no test coverage detected