Skip to content

Commit 5fd21fe

Browse files
committed
TST: missing assert_produces_warning
1 parent 1b69e58 commit 5fd21fe

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
@@ -164,9 +164,11 @@ def test_loc_getitem_label_list_with_missing(self):
164164
self.check_result('list lbl', 'loc', [3, 6, 7], 'ix', [3, 6, 7],
165165
typs=['ints', 'uints', 'floats'],
166166
axes=1, fails=KeyError)
167-
self.check_result('list lbl', 'loc', [4, 8, 10], 'ix', [4, 8, 10],
168-
typs=['ints', 'uints', 'floats'],
169-
axes=2, fails=KeyError)
167+
168+
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
169+
self.check_result('list lbl', 'loc', [4, 8, 10], 'ix', [4, 8, 10],
170+
typs=['ints', 'uints', 'floats'],
171+
axes=2, fails=KeyError)
170172

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

0 commit comments

Comments
 (0)