Skip to content

Commit 7864171

Browse files
author
MomIsBestFriend
committed
Added test case
1 parent 13bbe7c commit 7864171

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pandas/tests/reductions/test_reductions.py

+12-9
Original file line numberDiff line numberDiff line change
@@ -811,15 +811,6 @@ def test_all_any(self):
811811
assert not bool_series.all()
812812
assert bool_series.any()
813813

814-
# GH 12863
815-
s1 = Series(["abc", True])
816-
s2 = Series(["abc", False])
817-
818-
assert s1.all()
819-
assert s1.any()
820-
821-
assert not s2.all()
822-
assert s2.any()
823814

824815
def test_all_any_params(self):
825816
# Check skipna, with implicit 'object' dtype.
@@ -856,6 +847,18 @@ def test_all_any_params(self):
856847
with pytest.raises(NotImplementedError):
857848
s.all(bool_only=True)
858849

850+
def test_all_any_object_dtype(self):
851+
# GH 12863
852+
853+
s1 = Series(["abc", True])
854+
s2 = Series(["abc", False])
855+
856+
assert s1.all()
857+
assert s1.any()
858+
859+
assert not s2.all()
860+
assert s2.any()
861+
859862
def test_timedelta64_analytics(self):
860863

861864
# index min/max

0 commit comments

Comments
 (0)