()
| 3566 | |
| 3567 | |
| 3568 | def test_index_errors(): |
| 3569 | df = _compat.makeTimeDataFrame() |
| 3570 | ddf = dd.from_pandas(df.reset_index(), npartitions=2) |
| 3571 | with pytest.raises(NotImplementedError, match="You tried to index with this index"): |
| 3572 | ddf.set_index([["A"]]) # should index with ["A"] instead of [["A"]] |
| 3573 | with pytest.raises(NotImplementedError, match="You tried to index with a frame"): |
| 3574 | ddf.set_index(ddf[["A"]]) # should index with ddf["A"] instead of ddf[["A"]] |
| 3575 | with pytest.raises(KeyError, match="has no column|None of"): |
| 3576 | ddf.set_index("foo") # a column that doesn't exist |
| 3577 | with pytest.raises(KeyError, match="has no column|None of"): |
| 3578 | # column name doesn't need to be a string, but anyhow a KeyError should be raised if not found |
| 3579 | ddf.set_index(0) |
| 3580 | |
| 3581 | |
| 3582 | @pytest.mark.parametrize("null_value", [None, pd.NaT, pd.NA]) |
nothing calls this directly
no test coverage detected