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

Method test_file_object

python/pyarrow/tests/test_csv.py:1680–1687  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1678 return self.open_bytes(b, **kwargs).read_all()
1679
1680 def test_file_object(self):
1681 data = b"a,b\n1,2\n3,4\n"
1682 expected_data = {'a': [1, 3], 'b': [2, 4]}
1683 bio = io.BytesIO(data)
1684 reader = self.open_csv(bio)
1685 expected_schema = pa.schema([('a', pa.int64()),
1686 ('b', pa.int64())])
1687 self.check_reader(reader, expected_schema, [expected_data])
1688
1689 def test_header(self):
1690 rows = b"abc,def,gh\n"

Callers

nothing calls this directly

Calls 3

open_csvMethod · 0.95
check_readerMethod · 0.95
schemaMethod · 0.45

Tested by

no test coverage detected