Make sure ReadOptions can be used.
()
| 1578 | |
| 1579 | |
| 1580 | def test_read_options(): |
| 1581 | """Make sure ReadOptions can be used.""" |
| 1582 | expected = pa.Table.from_arrays([pa.array([1, 2, 3, 4])], names=["b"]) |
| 1583 | with ConstantFlightServer() as server, \ |
| 1584 | FlightClient(('localhost', server.port)) as client: |
| 1585 | options = flight.FlightCallOptions( |
| 1586 | read_options=IpcReadOptions(included_fields=[1])) |
| 1587 | response1 = client.do_get(flight.Ticket( |
| 1588 | b'multi'), options=options).read_all() |
| 1589 | response2 = client.do_get(flight.Ticket(b'multi')).read_all() |
| 1590 | |
| 1591 | assert response2.num_columns == 2 |
| 1592 | assert response1.num_columns == 1 |
| 1593 | assert response1 == expected |
| 1594 | assert response2 == multiple_column_table() |
| 1595 | |
| 1596 | |
| 1597 | basic_auth_handler = HttpBasicServerAuthHandler(creds={ |
nothing calls this directly
no test coverage detected