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

Method test_file_object

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

Source from the content-addressed store, hash-verified

351 return self.read_json(pa.py_buffer(b), **kwargs)
352
353 def test_file_object(self):
354 data = b'{"a": 1, "b": 2}\n'
355 expected_data = {'a': [1], 'b': [2]}
356 bio = io.BytesIO(data)
357 table = self.read_json(bio)
358 assert table.to_pydict() == expected_data
359 # Text files not allowed
360 sio = io.StringIO(data.decode())
361 with pytest.raises(TypeError):
362 self.read_json(sio)
363
364 def test_reconcile_across_blocks(self):
365 # ARROW-12065: reconciling inferred types across blocks

Callers

nothing calls this directly

Calls 2

read_jsonMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected