Skip to content

Commit

Permalink
Add tests for NA in base.grep/grepl
Browse files Browse the repository at this point in the history
  • Loading branch information
pwwang committed Jun 25, 2021
1 parent aaac106 commit 50daefb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_base_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def test_grepl(caplog):
grepl(['a', 'b'], 'a')
assert 'has length > 1' in caplog.text

# NA
out = grepl('a', ['a', NA])
assert_iterable_equal(out, [True, False])


def test_sub():
txt = ["arm","foot","lefroo", "bafoobarfoo"]
out = sub("foo", "bar", txt)
Expand Down

0 comments on commit 50daefb

Please sign in to comment.