Skip to content

Commit 45257d1

Browse files
authored
TST: Add tests string series min max (#45505)
1 parent 5b07b53 commit 45257d1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/series/test_reductions.py

+8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
import pandas._testing as tm
1010

1111

12+
@pytest.mark.parametrize("operation, expected", [("min", "a"), ("max", "b")])
13+
def test_reductions_series_strings(operation, expected):
14+
# GH#31746
15+
ser = Series(["a", "b"], dtype="string")
16+
res_operation_serie = getattr(ser, operation)()
17+
assert res_operation_serie == expected
18+
19+
1220
@pytest.mark.parametrize("as_period", [True, False])
1321
def test_mode_extension_dtype(as_period):
1422
# GH#41927 preserve dt64tz dtype

0 commit comments

Comments
 (0)