(self)
| 1398 | assert table.to_pydict() == {'': []} |
| 1399 | |
| 1400 | def test_empty_lines(self): |
| 1401 | rows = b"a,b\n\r1,2\r\n\r\n3,4\r\n" |
| 1402 | table = self.read_bytes(rows) |
| 1403 | assert table.to_pydict() == { |
| 1404 | 'a': [1, 3], |
| 1405 | 'b': [2, 4], |
| 1406 | } |
| 1407 | parse_options = ParseOptions(ignore_empty_lines=False) |
| 1408 | table = self.read_bytes(rows, parse_options=parse_options) |
| 1409 | assert table.to_pydict() == { |
| 1410 | 'a': [None, 1, None, 3], |
| 1411 | 'b': [None, 2, None, 4], |
| 1412 | } |
| 1413 | read_options = ReadOptions(skip_rows=2) |
| 1414 | table = self.read_bytes(rows, parse_options=parse_options, |
| 1415 | read_options=read_options) |
| 1416 | assert table.to_pydict() == { |
| 1417 | '1': [None, 3], |
| 1418 | '2': [None, 4], |
| 1419 | } |
| 1420 | |
| 1421 | def test_invalid_csv(self): |
| 1422 | # Various CSV errors |
nothing calls this directly
no test coverage detected