Skip to content

Commit a3a1ccc

Browse files
committed
TST: Fix inconsistencies in tests for ix with missing labels
1 parent 2d44804 commit a3a1ccc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pandas/tests/indexing/test_indexing.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,9 @@ def test_dups_fancy_indexing(self):
192192
result = df.loc[rows]
193193
tm.assert_frame_equal(result, expected)
194194

195-
# inconsistent returns for unique/duplicate indices when values are
196-
# missing
197-
df = DataFrame(np.random.randn(4, 3), index=list('ABCD'))
198-
expected = df.reindex(['E'])
199-
200195
dfnu = DataFrame(np.random.randn(5, 3), index=list('AABCD'))
201-
with catch_warnings(record=True):
202-
result = dfnu.ix[['E']]
203-
tm.assert_frame_equal(result, expected)
196+
with pytest.raises(KeyError):
197+
dfnu.ix[['E']]
204198

205199
# ToDo: check_index_type can be True after GH 11497
206200

0 commit comments

Comments
 (0)