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:2788–2799  ·  view source on GitHub ↗
(as_frame)

Source from the content-addressed store, hash-verified

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