Skip to content

Commit

Permalink
Raise exception when size is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalidmammadov committed Oct 15, 2024
1 parent d5b1354 commit d960e63
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions py-polars/tests/unit/dataframe/test_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,17 +364,13 @@ def test_sort_multi_output_exprs_01() -> None:

with pytest.raises(
ValueError,
match=(
"size of `descending` or `nulls_last` must be 1 when defined as list"
),
match="size of `descending` or `nulls_last` must be 1 when defined as list",
):
df.sort(by="dts", descending=[True, False])

with pytest.raises(
ValueError,
match=(
"size of `descending` or `nulls_last` must be 1 when defined as list"
),
match="size of `descending` or `nulls_last` must be 1 when defined as list",
):
df.sort(by="dts", nulls_last=[True, False])

Expand Down

0 comments on commit d960e63

Please sign in to comment.