MCPcopy Create free account
hub / github.com/dask/dask / test_csv_parse_fail

Function test_csv_parse_fail

dask/dataframe/io/tests/test_csv.py:1804–1814  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

1802
1803
1804def 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
1817def test_csv_name_should_be_different_even_if_head_is_same(tmpdir):

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
read_csvMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected