Skip to content

Commit 48fb72e

Browse files
committed
TST: missing assert_produces_warning
1 parent b936320 commit 48fb72e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/indexing/test_loc.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ def test_loc_getitem_label_list_with_missing(self):
167167
self.check_result('list lbl', 'loc', [3, 6, 7], 'ix', [3, 6, 7],
168168
typs=['ints', 'uints', 'floats'],
169169
axes=1, fails=KeyError)
170-
self.check_result('list lbl', 'loc', [4, 8, 10], 'ix', [4, 8, 10],
171-
typs=['ints', 'uints', 'floats'],
172-
axes=2, fails=KeyError)
170+
171+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
172+
self.check_result('list lbl', 'loc', [4, 8, 10], 'ix', [4, 8, 10],
173+
typs=['ints', 'uints', 'floats'],
174+
axes=2, fails=KeyError)
173175

174176
# GH 17758 - MultiIndex and missing keys
175177
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):

0 commit comments

Comments
 (0)