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

Method check_reader

python/pyarrow/tests/test_csv.py:1598–1605  ·  view source on GitHub ↗
(self, reader, expected_schema, expected_data)

Source from the content-addressed store, hash-verified

1596 return self.open_csv(pa.py_buffer(b), **kwargs)
1597
1598 def check_reader(self, reader, expected_schema, expected_data):
1599 assert reader.schema == expected_schema
1600 batches = list(reader)
1601 assert len(batches) == len(expected_data)
1602 for batch, expected_batch in zip(batches, expected_data):
1603 batch.validate(full=True)
1604 assert batch.schema == expected_schema
1605 assert batch.to_pydict() == expected_batch
1606
1607 def read_bytes(self, b, **kwargs):
1608 return self.open_bytes(b, **kwargs).read_all()

Callers 7

test_file_objectMethod · 0.95
test_headerMethod · 0.95
test_inferenceMethod · 0.95
test_column_optionsMethod · 0.95
test_encodingMethod · 0.95

Calls 3

listFunction · 0.85
lenFunction · 0.85
validateMethod · 0.45

Tested by

no test coverage detected