(tmpdir)
| 1802 | |
| 1803 | |
| 1804 | def test_csv_parse_fail(tmpdir): |
| 1805 | # See GH #7680 |
| 1806 | path = os.path.join(str(tmpdir), "test.csv") |
| 1807 | data = b'a,b\n1,"hi\n"\n2,"oi\n"\n' |
| 1808 | expected = pd.read_csv(BytesIO(data)) |
| 1809 | with open(path, "wb") as f: |
| 1810 | f.write(data) |
| 1811 | with pytest.raises(ValueError, match="EOF encountered"): |
| 1812 | dd.read_csv(path, sample=13) |
| 1813 | df = dd.read_csv(path, sample=13, sample_rows=1) |
| 1814 | assert_eq(df, expected) |
| 1815 | |
| 1816 | |
| 1817 | def test_csv_name_should_be_different_even_if_head_is_same(tmpdir): |