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

Function test_flight_generator_stream_of_table

python/pyarrow/tests/test_flight.py:1438–1451  ·  view source on GitHub ↗

Try downloading a flight of Table in a GeneratorStream.

()

Source from the content-addressed store, hash-verified

1436
1437
1438def test_flight_generator_stream_of_table():
1439 """Try downloading a flight of Table in a GeneratorStream."""
1440 data = pa.Table.from_arrays([
1441 pa.array(range(0, 10 * 1024))
1442 ], names=['a'])
1443
1444 with EchoTableStreamFlightServer() as server, \
1445 FlightClient(('localhost', server.port)) as client:
1446 writer, _ = client.do_put(flight.FlightDescriptor.for_path('test'),
1447 data.schema)
1448 writer.write_table(data)
1449 writer.close()
1450 result = client.do_get(flight.Ticket(b'')).read_all()
1451 assert result.equals(data)
1452
1453
1454def test_flight_generator_stream_of_table_with_dict():

Callers

nothing calls this directly

Calls 8

FlightClientClass · 0.90
equalsMethod · 0.80
arrayMethod · 0.45
do_putMethod · 0.45
write_tableMethod · 0.45
closeMethod · 0.45
do_getMethod · 0.45

Tested by

no test coverage detected