MCPcopy Create free account
hub / github.com/apache/arrow / test_stream_simple_roundtrip

Function test_stream_simple_roundtrip

python/pyarrow/tests/test_ipc.py:405–420  ·  view source on GitHub ↗
(stream_fixture)

Source from the content-addressed store, hash-verified

403
404
405def test_stream_simple_roundtrip(stream_fixture):
406 batches = stream_fixture.write_batches()
407 file_contents = pa.BufferReader(stream_fixture.get_source())
408 reader = pa.ipc.open_stream(file_contents)
409
410 assert reader.schema.equals(batches[0].schema)
411
412 total = 0
413 for i, next_batch in enumerate(reader):
414 assert next_batch.equals(batches[i])
415 total += 1
416
417 assert total == len(batches)
418
419 with pytest.raises(StopIteration):
420 reader.read_next_batch()
421
422
423@pytest.mark.zstd

Callers

nothing calls this directly

Calls 5

lenFunction · 0.85
write_batchesMethod · 0.80
BufferReaderMethod · 0.80
get_sourceMethod · 0.80
equalsMethod · 0.80

Tested by

no test coverage detected