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

Function test_all

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

Source from the content-addressed store, hash-verified

826
827
828def test_all():
829 # ARROW-10301
830
831 options = pc.ScalarAggregateOptions(skip_nulls=False, min_count=0)
832
833 a = pa.array([], type='bool')
834 assert pc.all(a).as_py() is None
835 assert pc.all(a, min_count=0).as_py() is True
836 assert pc.all(a, options=options).as_py() is True
837
838 a = pa.array([False, True])
839 assert pc.all(a).as_py() is False
840 assert pc.all(a, options=options).as_py() is False
841
842 a = pa.array([True, None])
843 assert pc.all(a).as_py() is True
844 assert pc.all(a, options=options).as_py() is None
845
846 a = pa.chunked_array([[True], [True, None]])
847 assert pc.all(a).as_py() is True
848 assert pc.all(a, options=options).as_py() is None
849
850 a = pa.chunked_array([[True], [False]])
851 assert pc.all(a).as_py() is False
852 assert pc.all(a, options=options).as_py() is False
853
854
855def 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