File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -863,6 +863,20 @@ def test_all_any_params(self):
863
863
with pytest .raises (NotImplementedError ):
864
864
s .all (bool_only = True )
865
865
866
+ def test_all_any_boolean (self ):
867
+ # Check skipna, with boolean type
868
+ s1 = Series ([pd .NA , True ], dtype = "boolean" )
869
+ s2 = Series ([pd .NA , False ], dtype = "boolean" )
870
+ assert pd .isna (s1 .all (skipna = False )) # NA && True => NA
871
+ assert s1 .all (skipna = True )
872
+ assert pd .isna (s2 .any (skipna = False )) # NA || False => NA
873
+ assert not s2 .any (skipna = True )
874
+ # GH-33253: all True / all False values buggy with skipna=False
875
+ s3 = Series ([True , True ], dtype = "boolean" )
876
+ s4 = Series ([False , False ], dtype = "boolean" )
877
+ assert s3 .all (skipna = False )
878
+ assert not s4 .any (skipna = False )
879
+
866
880
def test_timedelta64_analytics (self ):
867
881
868
882
# index min/max
You can’t perform that action at this time.
0 commit comments