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

Method test_stress_block_sizes

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

Source from the content-addressed store, hash-verified

1452 assert table.to_pydict() == expected.to_pydict()
1453
1454 def test_stress_block_sizes(self):
1455 # Test a number of small block sizes to stress block stitching
1456 csv_base, expected = make_random_csv(num_cols=2, num_rows=500)
1457 block_sizes = [11, 12, 13, 17, 37, 111]
1458 csvs = [csv_base, csv_base.rstrip(b'\r\n')]
1459 for csv in csvs:
1460 for block_size in block_sizes:
1461 read_options = ReadOptions(block_size=block_size)
1462 table = self.read_bytes(csv, read_options=read_options)
1463 assert table.schema == expected.schema
1464 if not table.equals(expected):
1465 # Better error output
1466 assert table.to_pydict() == expected.to_pydict()
1467
1468 def test_stress_convert_options_blowup(self):
1469 # 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