MCPcopy
hub / github.com/dask/dask / test_to_dask_array_raises

Function test_to_dask_array_raises

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

Source from the content-addressed store, hash-verified

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…