(tmp_path)
| 92 | |
| 93 | @pytest.fixture |
| 94 | def data_dir_with_arrow(tmp_path): |
| 95 | data_dir = tmp_path / "data_dir" |
| 96 | data_dir.mkdir() |
| 97 | output_train = os.path.join(data_dir, "train.arrow") |
| 98 | with ArrowWriter(path=output_train) as writer: |
| 99 | writer.write_table(pa.Table.from_pydict({"col_1": ["foo"] * 10})) |
| 100 | num_examples, num_bytes = writer.finalize() |
| 101 | assert num_examples == 10 |
| 102 | assert num_bytes > 0 |
| 103 | output_test = os.path.join(data_dir, "test.arrow") |
| 104 | with ArrowWriter(path=output_test) as writer: |
| 105 | writer.write_table(pa.Table.from_pydict({"col_1": ["bar"] * 10})) |
| 106 | num_examples, num_bytes = writer.finalize() |
| 107 | assert num_examples == 10 |
| 108 | assert num_bytes > 0 |
| 109 | return str(data_dir) |
| 110 | |
| 111 | |
| 112 | @pytest.fixture |
nothing calls this directly
no test coverage detected