(self)
| 312 | |
| 313 | @pytest.mark.numpy |
| 314 | def test_stress_block_sizes(self): |
| 315 | # Test a number of small block sizes to stress block stitching |
| 316 | data_base, expected = make_random_json(num_cols=2, num_rows=100) |
| 317 | read_options = ReadOptions() |
| 318 | parse_options = ParseOptions() |
| 319 | |
| 320 | for data in [data_base, data_base.rstrip(b'\r\n')]: |
| 321 | for newlines_in_values in [False, True]: |
| 322 | parse_options.newlines_in_values = newlines_in_values |
| 323 | for block_size in [22, 23, 37]: |
| 324 | read_options.block_size = block_size |
| 325 | table = self.read_bytes(data, read_options=read_options, |
| 326 | parse_options=parse_options) |
| 327 | assert table.schema == expected.schema |
| 328 | if not table.equals(expected): |
| 329 | # Better error output |
| 330 | assert table.to_pydict() == expected.to_pydict() |
| 331 | |
| 332 | |
| 333 | class BaseTestJSONRead(BaseTestJSON): |
nothing calls this directly
no test coverage detected