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

Method test_file_object

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

Source from the content-addressed store, hash-verified

1608 return self.open_bytes(b, **kwargs).read_all()
1609
1610 def test_file_object(self):
1611 data = b"a,b\n1,2\n3,4\n"
1612 expected_data = {'a': [1, 3], 'b': [2, 4]}
1613 bio = io.BytesIO(data)
1614 reader = self.open_csv(bio)
1615 expected_schema = pa.schema([('a', pa.int64()),
1616 ('b', pa.int64())])
1617 self.check_reader(reader, expected_schema, [expected_data])
1618
1619 def test_header(self):
1620 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