Skip to content

Commit

Permalink
Add deprecation test
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 17, 2024
1 parent 06acd68 commit 93a874c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions py-polars/tests/unit/namespaces/string/test_concat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from datetime import datetime

import pytest

import polars as pl
from polars.testing import assert_series_equal

Expand Down Expand Up @@ -66,3 +68,11 @@ def test_str_concat_datetime() -> None:
assert out.item() == "2020-01-01 00:00:00.000000|2022-01-01 00:00:00.000000"
out = df.select(pl.col("d").str.concat("|", ignore_nulls=False))
assert out.item() is None


def test_str_concat_delimiter_deprecated() -> None:
s = pl.Series(["1", None, "2", None])
with pytest.deprecated_call():
result = s.str.concat()
expected = pl.Series(["1-2"])
assert_series_equal(result, expected)

0 comments on commit 93a874c

Please sign in to comment.