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

Method test_file_object

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

Source from the content-addressed store, hash-verified

409 return self.open_bytes(b, **kwargs).read_all()
410
411 def test_file_object(self):
412 data = b'{"a": 1, "b": 2}\n'
413 expected_data = {'a': [1], 'b': [2]}
414 bio = io.BytesIO(data)
415 reader = self.open_json(bio)
416 expected_schema = pa.schema([('a', pa.int64()),
417 ('b', pa.int64())])
418 self.check_reader(reader, expected_schema, [expected_data])
419
420 def test_bad_first_chunk(self):
421 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