(self)
| 1468 | assert table.to_pydict() == {'': []} |
| 1469 | |
| 1470 | def test_empty_lines(self): |
| 1471 | rows = b"a,b\n\r1,2\r\n\r\n3,4\r\n" |
| 1472 | table = self.read_bytes(rows) |
| 1473 | assert table.to_pydict() == { |
| 1474 | 'a': [1, 3], |
| 1475 | 'b': [2, 4], |
| 1476 | } |
| 1477 | parse_options = ParseOptions(ignore_empty_lines=False) |
| 1478 | table = self.read_bytes(rows, parse_options=parse_options) |
| 1479 | assert table.to_pydict() == { |
| 1480 | 'a': [None, 1, None, 3], |
| 1481 | 'b': [None, 2, None, 4], |
| 1482 | } |
| 1483 | read_options = ReadOptions(skip_rows=2) |
| 1484 | table = self.read_bytes(rows, parse_options=parse_options, |
| 1485 | read_options=read_options) |
| 1486 | assert table.to_pydict() == { |
| 1487 | '1': [None, 3], |
| 1488 | '2': [None, 4], |
| 1489 | } |
| 1490 | |
| 1491 | def test_invalid_csv(self): |
| 1492 | # Various CSV errors |
nothing calls this directly
no test coverage detected