@@ -234,10 +234,12 @@ def test_getitem_partial_str_slice_high_reso_with_timedeltaindex(self):
234234 result = ser ["1 days, 10:11:12.001001" ]
235235 assert result == ser .iloc [1001 ]
236236
237- def test_getitem_slice_2d (self , datetime_series ):
237+ def test_getitem_slice_2d (self , datetime_series , using_array_manager ):
238238 # GH#30588 multi-dimensional indexing deprecated
239239
240- with tm .assert_produces_warning (FutureWarning ):
240+ with tm .assert_produces_warning (
241+ FutureWarning , check_stacklevel = not using_array_manager
242+ ):
241243 # GH#30867 Don't want to support this long-term, but
242244 # for now ensure that the warning from Index
243245 # doesn't comes through via Series.__getitem__.
@@ -518,9 +520,11 @@ def test_getitem_generator(string_series):
518520 Series (date_range ("2012-01-01" , periods = 2 , tz = "CET" )),
519521 ],
520522)
521- def test_getitem_ndim_deprecated (series ):
523+ def test_getitem_ndim_deprecated (series , using_array_manager ):
522524 with tm .assert_produces_warning (
523- FutureWarning , match = "Support for multi-dimensional indexing"
525+ FutureWarning ,
526+ match = "Support for multi-dimensional indexing" ,
527+ check_stacklevel = not using_array_manager ,
524528 ):
525529 result = series [:, None ]
526530
0 commit comments