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

Method test_file_object

python/pyarrow/tests/test_json.py:396–403  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

394 return self.open_bytes(b, **kwargs).read_all()
395
396 def test_file_object(self):
397 data = b'{"a": 1, "b": 2}\n'
398 expected_data = {'a': [1], 'b': [2]}
399 bio = io.BytesIO(data)
400 reader = self.open_json(bio)
401 expected_schema = pa.schema([('a', pa.int64()),
402 ('b', pa.int64())])
403 self.check_reader(reader, expected_schema, [expected_data])
404
405 def test_bad_first_chunk(self):
406 bad_first_chunk = b'{"i": 0 }\n{"i": 1}'

Callers

nothing calls this directly

Calls 3

open_jsonMethod · 0.95
check_readerMethod · 0.95
schemaMethod · 0.45

Tested by

no test coverage detected