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

Function test_all

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

Source from the content-addressed store, hash-verified

831
832
833def test_all():
834 # ARROW-10301
835
836 options = pc.ScalarAggregateOptions(skip_nulls=False, min_count=0)
837
838 a = pa.array([], type='bool')
839 assert pc.all(a).as_py() is None
840 assert pc.all(a, min_count=0).as_py() is True
841 assert pc.all(a, options=options).as_py() is True
842
843 a = pa.array([False, True])
844 assert pc.all(a).as_py() is False
845 assert pc.all(a, options=options).as_py() is False
846
847 a = pa.array([True, None])
848 assert pc.all(a).as_py() is True
849 assert pc.all(a, options=options).as_py() is None
850
851 a = pa.chunked_array([[True], [True, None]])
852 assert pc.all(a).as_py() is True
853 assert pc.all(a, options=options).as_py() is None
854
855 a = pa.chunked_array([[True], [False]])
856 assert pc.all(a).as_py() is False
857 assert pc.all(a, options=options).as_py() is False
858
859
860def test_is_valid():

Callers

nothing calls this directly

Calls 5

as_pyMethod · 0.80
allMethod · 0.80
chunked_arrayMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected