#NEWLINE# def test_setitem( self ) : #NEWLINE# #INDENT# self . panel [ 'ItemE' ] = self . panel [ 'ItemC' ] #NEWLINE# self . panel [ 'ItemF' ] = self . panel [ 'ItemC' ] . to_dense ( ) #NEWLINE# tm . assert_sp_frame_equal ( self . panel [ 'ItemE' ] , self . panel [ 'ItemC' ] ) #NEWLINE# tm . assert_sp_frame_equal ( self . panel [ 'ItemF' ] , self . panel [ 'ItemC' ] ) #NEWLINE# expected = pd . Index ( [ 'ItemA' , 'ItemB' , 'ItemC' , 'ItemD' , 'ItemE' , 'ItemF' ] ) #NEWLINE# tm . assert_index_equal ( self . panel . items , expected ) #NEWLINE# self . assertRaises ( Exception , self . panel . __setitem__ , 'item6' , 1 )