From 30c406ee6cc26abb241ddf08efebcdfe6522e6f7 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Sat, 26 Aug 2023 21:34:33 +0200 Subject: [PATCH] Add test for deprecation --- py-polars/tests/unit/operations/test_map.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/py-polars/tests/unit/operations/test_map.py b/py-polars/tests/unit/operations/test_map.py index 8faaf784d10e4..89f9e3fe673c3 100644 --- a/py-polars/tests/unit/operations/test_map.py +++ b/py-polars/tests/unit/operations/test_map.py @@ -414,3 +414,10 @@ def test_map_elements_on_empty_col_10639() -> None: "B": [], "Foo": [], } + + +def test_apply_deprecated() -> None: + with pytest.deprecated_call(): + pl.col("a").apply(lambda x: x + 1) + with pytest.deprecated_call(): + pl.Series([1, 2, 3]).apply(lambda x: x + 1)