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

Function decoder

dev/archery/conftest.py:55–64  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

53 current_test_directory = pathlib.Path(request.node.fspath).parent
54
55 def decoder(path):
56 with path.open('r') as fp:
57 if path.suffix == '.json':
58 import json
59 return json.load(fp)
60 elif path.suffix == '.yaml':
61 import yaml
62 return yaml.load(fp)
63 else:
64 return fp.read()
65
66 def loader(name, decoder=decoder):
67 path = current_test_directory / 'fixtures' / name

Callers 1

loaderFunction · 0.85

Calls 3

openMethod · 0.45
loadMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected