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

Function test_split_whitespace_utf8

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

Source from the content-addressed store, hash-verified

732
733
734def test_split_whitespace_utf8():
735 arr = pa.array(["foo bar", " foo \u3000\tb"])
736 result = pc.utf8_split_whitespace(arr)
737 expected = pa.array([["foo", "bar"], ["", "foo", "b"]])
738 assert expected.equals(result)
739
740 result = pc.utf8_split_whitespace(arr, max_splits=1)
741 expected = pa.array([["foo", "bar"], ["", "foo \u3000\tb"]])
742 assert expected.equals(result)
743
744 result = pc.utf8_split_whitespace(arr, max_splits=1, reverse=True)
745 expected = pa.array([["foo", "bar"], [" foo", "b"]])
746 assert expected.equals(result)
747
748
749def test_split_whitespace_ascii():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected