Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- committed Jun 13, 2024
1 parent e4a5b6d commit cbe4091
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py-polars/tests/unit/dataframe/test_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ def test_group_by_slice_expression_args() -> None:

out = (
df.group_by("groups", maintain_order=True)
.agg([pl.col("vals").slice(pl.len() * 0.1, (pl.len() // 5))])
.agg([pl.col("vals").slice((pl.len() * 0.1).cast(int), (pl.len() // 5))])
.explode("vals")
)

Expand Down
4 changes: 2 additions & 2 deletions py-polars/tests/unit/expr/test_exprs.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def test_head() -> None:
assert df.select(pl.col("a").head(10)).to_dict(as_series=False) == {
"a": [1, 2, 3, 4, 5]
}
assert df.select(pl.col("a").head(pl.len() / 2)).to_dict(as_series=False) == {
assert df.select(pl.col("a").head(pl.len() // 2)).to_dict(as_series=False) == {
"a": [1, 2]
}

Expand All @@ -690,7 +690,7 @@ def test_tail() -> None:
assert df.select(pl.col("a").tail(10)).to_dict(as_series=False) == {
"a": [1, 2, 3, 4, 5]
}
assert df.select(pl.col("a").tail(pl.len() / 2)).to_dict(as_series=False) == {
assert df.select(pl.col("a").tail(pl.len() // 2)).to_dict(as_series=False) == {
"a": [4, 5]
}

Expand Down

0 comments on commit cbe4091

Please sign in to comment.