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

Function read_flight_resource

python/pyarrow/tests/test_flight.py:82–94  ·  view source on GitHub ↗

Get the contents of a test resource file.

(path)

Source from the content-addressed store, hash-verified

80
81
82def read_flight_resource(path):
83 """Get the contents of a test resource file."""
84 root = resource_root()
85 if not root:
86 return None
87 try:
88 with (root / path).open("rb") as f:
89 return f.read()
90 except FileNotFoundError:
91 raise RuntimeError(
92 f"Test resource {root / path} not found; did you initialize the "
93 f"test resource submodule?\n{traceback.format_exc()}"
94 )
95
96
97def example_tls_certs():

Callers 1

example_tls_certsFunction · 0.85

Calls 3

resource_rootFunction · 0.85
openMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected