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

Function test_nicer_server_exceptions

python/pyarrow/tests/test_flight.py:1332–1344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1330
1331
1332def test_nicer_server_exceptions():
1333 with ConvenienceServer() as server, \
1334 FlightClient(('localhost', server.port)) as client:
1335 with pytest.raises(flight.FlightServerError,
1336 match="a bytes-like object is required"):
1337 list(client.do_action('bad-action'))
1338 # While Flight/C++ sends across the original status code, it
1339 # doesn't get mapped to the equivalent code here, since we
1340 # want to be able to distinguish between client- and server-
1341 # side errors.
1342 with pytest.raises(flight.FlightServerError,
1343 match="ArrowMemoryError"):
1344 list(client.do_action('arrow-exception'))
1345
1346
1347def test_get_port():

Callers

nothing calls this directly

Calls 4

FlightClientClass · 0.90
ConvenienceServerClass · 0.85
listFunction · 0.85
do_actionMethod · 0.45

Tested by

no test coverage detected