(self)
| 1490 | } |
| 1491 | |
| 1492 | def test_invalid_csv(self): |
| 1493 | # Various CSV errors |
| 1494 | rows = b"a,b,c\n1,2\n4,5,6\n" |
| 1495 | with pytest.raises(pa.ArrowInvalid, match="Expected 3 columns, got 2"): |
| 1496 | self.read_bytes(rows) |
| 1497 | rows = b"a,b,c\n1,2,3\n4" |
| 1498 | with pytest.raises(pa.ArrowInvalid, match="Expected 3 columns, got 1"): |
| 1499 | self.read_bytes(rows) |
| 1500 | for rows in [b"", b"\n", b"\r\n", b"\r", b"\n\n"]: |
| 1501 | with pytest.raises(pa.ArrowInvalid, match="Empty CSV file"): |
| 1502 | self.read_bytes(rows) |
| 1503 | |
| 1504 | def test_options_delimiter(self): |
| 1505 | rows = b"a;b,c\nde,fg;eh\n" |
nothing calls this directly
no test coverage detected