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

Function test

python/pyarrow/tests/test_flight.py:2413–2429  ·  view source on GitHub ↗
(read_all)

Source from the content-addressed store, hash-verified

2411 exc_types = (KeyboardInterrupt, pa.ArrowCancelled)
2412
2413 def test(read_all):
2414 try:
2415 try:
2416 t = threading.Thread(target=signal_from_thread)
2417 with pytest.raises(exc_types) as exc_info:
2418 t.start()
2419 read_all()
2420 finally:
2421 t.join()
2422 except KeyboardInterrupt:
2423 # In case KeyboardInterrupt didn't interrupt read_all
2424 # above, at least prevent it from stopping the test suite
2425 pytest.fail("KeyboardInterrupt didn't interrupt Flight read_all")
2426 # __context__ is sometimes None
2427 e = exc_info.value
2428 assert isinstance(e, (pa.ArrowCancelled, KeyboardInterrupt)) or \
2429 isinstance(e.__context__, (pa.ArrowCancelled, KeyboardInterrupt))
2430
2431 with CancelFlightServer() as server, \
2432 FlightClient(("localhost", server.port)) as client:

Callers 15

TestORCFileReaderClass · 0.85
TestFileSelectorClass · 0.85
TestArrayStatisticsClass · 0.85
TestMutableBufferClass · 0.85
TestTableClass · 0.85
TestFileInfoClass · 0.85
TestS3GlobalOptionsClass · 0.85
TestArrayBuilderClass · 0.85

Calls 3

startMethod · 0.45
joinMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected