diff --git a/py-polars/tests/unit/operations/map/test_map_groups.py b/py-polars/tests/unit/operations/map/test_map_groups.py index 5432f001a238..717b35303842 100644 --- a/py-polars/tests/unit/operations/map/test_map_groups.py +++ b/py-polars/tests/unit/operations/map/test_map_groups.py @@ -162,6 +162,6 @@ def foo(x: pl.Series) -> pl.Series: pl.DataFrame({"key": [0, 0, 1], "a": [None, None, None]}) .group_by("key") .agg(pl.map_groups(exprs=["a"], function=foo)) # type: ignore[arg-type] - .sort("a"), + .sort("key"), pl.DataFrame({"key": [0, 1], "a": [None, None]}), )