diff --git a/pandas/tests/series/methods/test_reset_index.py b/pandas/tests/series/methods/test_reset_index.py index 56f15c0b0e52c..9980b4450ba52 100644 --- a/pandas/tests/series/methods/test_reset_index.py +++ b/pandas/tests/series/methods/test_reset_index.py @@ -11,6 +11,7 @@ RangeIndex, Series, date_range, + option_context, ) import pandas._testing as tm @@ -165,8 +166,10 @@ def test_reset_index_inplace_and_drop_ignore_name(self): def test_reset_index_drop_infer_string(self): # GH#56160 + pytest.importorskip("pyarrow") ser = Series(["a", "b", "c"], dtype=object) - result = ser.reset_index(drop=True) + with option_context("future.infer_string", True): + result = ser.reset_index(drop=True) tm.assert_series_equal(result, ser)