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

Function test_to_dask_array_raises

dask/dataframe/tests/test_dataframe.py:2790–2801  ·  view source on GitHub ↗
(as_frame)

Source from the content-addressed store, hash-verified

2788
2789@pytest.mark.parametrize("as_frame", [False, False])
2790def test_to_dask_array_raises(as_frame):
2791 s = pd.Series([1, 2, 3, 4, 5, 6], name="foo")
2792 a = dd.from_pandas(s, npartitions=2)
2793
2794 if as_frame:
2795 a = a.to_frame()
2796
2797 with pytest.raises(ValueError, match="4 != 2"):
2798 a.to_dask_array((1, 2, 3, 4))
2799
2800 with pytest.raises(ValueError, match="Unexpected value"):
2801 a.to_dask_array(5)
2802
2803
2804@pytest.mark.parametrize("as_frame", [False, True])

Callers

nothing calls this directly

Calls 2

to_dask_arrayMethod · 0.80
to_frameMethod · 0.45

Tested by

no test coverage detected