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

Function test_match_substring_regex

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

Source from the content-addressed store, hash-verified

641
642
643def test_match_substring_regex():
644 arr = pa.array(["ab", "abc", "ba", "c", None])
645 result = pc.match_substring_regex(arr, "^a?b")
646 expected = pa.array([True, True, True, False, None])
647 assert expected.equals(result)
648
649 arr = pa.array(["aB", "Abc", "BA", "c", None])
650 result = pc.match_substring_regex(arr, "^a?b", ignore_case=True)
651 expected = pa.array([True, True, True, False, None])
652 assert expected.equals(result)
653 result = pc.match_substring_regex(arr, "^a?b", ignore_case=False)
654 expected = pa.array([False, False, False, False, None])
655 assert expected.equals(result)
656
657
658def test_trim():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected