Skip to content

Commit

Permalink
add pytest for zero-length match
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwendt committed May 2, 2022
1 parent f287381 commit adaee7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/cudf/cudf/tests/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,16 @@ def test_string_replace(
assert_eq(expect, got)


@pytest.mark.parametrize("pat", ["A*", "F?H?"])
def test_string_replace_zero_length(ps_gs, pat):
ps, gs = ps_gs

expect = ps.str.replace(pat, "_", regex=True)
got = gs.str.replace(pat, "_", regex=True)

assert_eq(expect, got)


def test_string_lower(ps_gs):
ps, gs = ps_gs

Expand Down

0 comments on commit adaee7b

Please sign in to comment.