MCPcopy Create free account
hub / github.com/apache/arrow / test_match_substring

Function test_match_substring

python/pyarrow/tests/test_compute.py:628–640  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

626
627
628def test_match_substring():
629 arr = pa.array(["ab", "abc", "ba", None])
630 result = pc.match_substring(arr, "ab")
631 expected = pa.array([True, True, False, None])
632 assert expected.equals(result)
633
634 arr = pa.array(["áB", "Ábc", "ba", None])
635 result = pc.match_substring(arr, "áb", ignore_case=True)
636 expected = pa.array([True, True, False, None])
637 assert expected.equals(result)
638 result = pc.match_substring(arr, "áb", ignore_case=False)
639 expected = pa.array([False, False, False, None])
640 assert expected.equals(result)
641
642
643def test_match_substring_regex():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected