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

Method test_file_object

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

Source from the content-addressed store, hash-verified

336 return self.read_json(pa.py_buffer(b), **kwargs)
337
338 def test_file_object(self):
339 data = b'{"a": 1, "b": 2}\n'
340 expected_data = {'a': [1], 'b': [2]}
341 bio = io.BytesIO(data)
342 table = self.read_json(bio)
343 assert table.to_pydict() == expected_data
344 # Text files not allowed
345 sio = io.StringIO(data.decode())
346 with pytest.raises(TypeError):
347 self.read_json(sio)
348
349 def test_reconcile_across_blocks(self):
350 # 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