(stream_fixture, options)
| 509 | metadata_version=pa.ipc.MetadataVersion.V4), |
| 510 | ]) |
| 511 | def test_stream_options_roundtrip(stream_fixture, options): |
| 512 | stream_fixture.options = options |
| 513 | batches = stream_fixture.write_batches() |
| 514 | file_contents = pa.BufferReader(stream_fixture.get_source()) |
| 515 | |
| 516 | message = pa.ipc.read_message(stream_fixture.get_source()) |
| 517 | assert message.metadata_version == options.metadata_version |
| 518 | |
| 519 | reader = pa.ipc.open_stream(file_contents) |
| 520 | |
| 521 | assert reader.schema.equals(batches[0].schema) |
| 522 | |
| 523 | total = 0 |
| 524 | for i, next_batch in enumerate(reader): |
| 525 | assert next_batch.equals(batches[i]) |
| 526 | total += 1 |
| 527 | |
| 528 | assert total == len(batches) |
| 529 | |
| 530 | with pytest.raises(StopIteration): |
| 531 | reader.read_next_batch() |
| 532 | |
| 533 | |
| 534 | def test_read_options(): |
nothing calls this directly
no test coverage detected