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

Method test_stress_block_sizes

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

Source from the content-addressed store, hash-verified

1523 assert table.to_pydict() == expected.to_pydict()
1524
1525 def test_stress_block_sizes(self):
1526 # Test a number of small block sizes to stress block stitching
1527 csv_base, expected = make_random_csv(num_cols=2, num_rows=500)
1528 block_sizes = [11, 12, 13, 17, 37, 111]
1529 csvs = [csv_base, csv_base.rstrip(b'\r\n')]
1530 for csv in csvs:
1531 for block_size in block_sizes:
1532 read_options = ReadOptions(block_size=block_size)
1533 table = self.read_bytes(csv, read_options=read_options)
1534 assert table.schema == expected.schema
1535 if not table.equals(expected):
1536 # Better error output
1537 assert table.to_pydict() == expected.to_pydict()
1538
1539 def test_stress_convert_options_blowup(self):
1540 # ARROW-6481: A convert_options with a very large number of columns

Callers

nothing calls this directly

Calls 4

read_bytesMethod · 0.95
ReadOptionsClass · 0.90
make_random_csvFunction · 0.85
equalsMethod · 0.80

Tested by

no test coverage detected