From 59f8a52a8c9a70cde29e14f6518e7e77f8e818e7 Mon Sep 17 00:00:00 2001 From: jreback Date: Sat, 6 Jul 2013 09:25:54 -0400 Subject: [PATCH] TST: additional test case for GH4146 --- pandas/tests/test_indexing.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandas/tests/test_indexing.py b/pandas/tests/test_indexing.py index 7cd31b8f04b3a..a4174c236c26a 100644 --- a/pandas/tests/test_indexing.py +++ b/pandas/tests/test_indexing.py @@ -1094,8 +1094,12 @@ def test_mi_access(self): # GH 4146, not returning a block manager when selecting a unique index # from a duplicate index expected = DataFrame([['a',1,1]],index=['A1'],columns=['h1','h3','h5'],).T - df3 = df2['A'] - result = df3['A1'] + result = df2['A']['A1'] + assert_frame_equal(result,expected) + + # selecting a non_unique from the 2nd level + expected = DataFrame([['d',4,4],['e',5,5]],index=Index(['B2','B2'],name='sub'),columns=['h1','h3','h5'],).T + result = df2['A']['B2'] assert_frame_equal(result,expected) if __name__ == '__main__':