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

Function read_flight_resource

python/pyarrow/tests/test_flight.py:80–92  ·  view source on GitHub ↗

Get the contents of a test resource file.

(path)

Source from the content-addressed store, hash-verified

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