(tmp_path)
| 8 | |
| 9 | @pytest.fixture |
| 10 | def arrow_file_streaming_format(tmp_path): |
| 11 | filename = tmp_path / "stream.arrow" |
| 12 | testdata = [[1, 1, 1], [0, 100, 6], [1, 90, 900]] |
| 13 | |
| 14 | schema = pa.schema([pa.field("input_ids", pa.list_(pa.int32()))]) |
| 15 | array = pa.array(testdata, type=pa.list_(pa.int32())) |
| 16 | table = pa.Table.from_arrays([array], schema=schema) |
| 17 | with open(filename, "wb") as f: |
| 18 | with pa.ipc.new_stream(f, schema) as writer: |
| 19 | writer.write_table(table) |
| 20 | return str(filename) |
| 21 | |
| 22 | |
| 23 | @pytest.fixture |
nothing calls this directly
no test coverage detected