@@ -234,10 +234,12 @@ def test_getitem_partial_str_slice_high_reso_with_timedeltaindex(self):
234
234
result = ser ["1 days, 10:11:12.001001" ]
235
235
assert result == ser .iloc [1001 ]
236
236
237
- def test_getitem_slice_2d (self , datetime_series ):
237
+ def test_getitem_slice_2d (self , datetime_series , using_array_manager ):
238
238
# GH#30588 multi-dimensional indexing deprecated
239
239
240
- with tm .assert_produces_warning (FutureWarning ):
240
+ with tm .assert_produces_warning (
241
+ FutureWarning , check_stacklevel = not using_array_manager
242
+ ):
241
243
# GH#30867 Don't want to support this long-term, but
242
244
# for now ensure that the warning from Index
243
245
# doesn't comes through via Series.__getitem__.
@@ -518,9 +520,11 @@ def test_getitem_generator(string_series):
518
520
Series (date_range ("2012-01-01" , periods = 2 , tz = "CET" )),
519
521
],
520
522
)
521
- def test_getitem_ndim_deprecated (series ):
523
+ def test_getitem_ndim_deprecated (series , using_array_manager ):
522
524
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 ,
524
528
):
525
529
result = series [:, None ]
526
530
0 commit comments