We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ef8e2 commit dfdddfaCopy full SHA for dfdddfa
pandas/tests/series/test_reductions.py
@@ -9,11 +9,15 @@
9
import pandas._testing as tm
10
11
12
-def test_reductions_series_strings():
+@pytest.mark.parametrize("operation", ["min", "max"])
13
+def test_reductions_series_strings(operation):
14
# GH#31746
- ser = Series(["a", "b"], dtype="string")
15
- assert ser.max() == "b"
16
- assert ser.min() == "a"
+ list_str = ["a", "b"]
+ ser = Series(list_str, dtype="string")
17
+ res_operation_serie = getattr(ser, operation)()
18
+ func_builtin_python = __builtins__[operation]
19
+ res_builtin_python = func_builtin_python(list_str)
20
+ assert res_operation_serie == res_builtin_python
21
22
23
@pytest.mark.parametrize("as_period", [True, False])
0 commit comments