@@ -426,9 +426,7 @@ def test_iloc_getitem_slice_dups(self):
426
426
tm .assert_frame_equal (df .iloc [10 :, :2 ], df2 )
427
427
tm .assert_frame_equal (df .iloc [10 :, 2 :], df1 )
428
428
429
- # TODO(CoW-warn) this should NOT warn -> Series inplace operator
430
- @pytest .mark .filterwarnings ("ignore:Setting a value on a view:FutureWarning" )
431
- def test_iloc_setitem (self ):
429
+ def test_iloc_setitem (self , warn_copy_on_write ):
432
430
df = DataFrame (
433
431
np .random .default_rng (2 ).standard_normal ((4 , 4 )),
434
432
index = np .arange (0 , 8 , 2 ),
@@ -1147,7 +1145,7 @@ def test_iloc_getitem_with_duplicates2(self):
1147
1145
expected = df .take ([0 ], axis = 1 )
1148
1146
tm .assert_frame_equal (result , expected )
1149
1147
1150
- def test_iloc_interval (self , warn_copy_on_write ):
1148
+ def test_iloc_interval (self ):
1151
1149
# GH#17130
1152
1150
df = DataFrame ({Interval (1 , 2 ): [1 , 2 ]})
1153
1151
@@ -1160,9 +1158,7 @@ def test_iloc_interval(self, warn_copy_on_write):
1160
1158
tm .assert_series_equal (result , expected )
1161
1159
1162
1160
result = df .copy ()
1163
- # TODO(CoW-warn) false positive
1164
- with tm .assert_cow_warning (warn_copy_on_write ):
1165
- result .iloc [:, 0 ] += 1
1161
+ result .iloc [:, 0 ] += 1
1166
1162
expected = DataFrame ({Interval (1 , 2 ): [2 , 3 ]})
1167
1163
tm .assert_frame_equal (result , expected )
1168
1164
0 commit comments