#NEWLINE# def test_is_( self ) : #NEWLINE# #INDENT# mi = MultiIndex . from_tuples ( lzip ( range ( 10 ) , range ( 10 ) ) ) #NEWLINE# self . assertTrue ( mi . is_ ( mi ) ) #NEWLINE# self . assertTrue ( mi . is_ ( mi . view ( ) ) ) #NEWLINE# self . assertTrue ( mi . is_ ( mi . view ( ) . view ( ) . view ( ) . view ( ) ) ) #NEWLINE# mi2 = mi . view ( ) #NEWLINE# mi2 . names = [ 'A' , 'B' ] #NEWLINE# self . assertTrue ( mi2 . is_ ( mi ) ) #NEWLINE# self . assertTrue ( mi . is_ ( mi2 ) ) #NEWLINE# self . assertTrue ( mi . is_ ( mi . set_names ( [ 'C' , 'D' ] ) ) ) #NEWLINE# mi2 = mi . view ( ) #NEWLINE# mi2 . set_names ( [ 'E' , 'F' ] , inplace = True ) #NEWLINE# self . assertTrue ( mi . is_ ( mi2 ) ) #NEWLINE# mi3 = mi2 . set_levels ( [ lrange ( 10 ) , lrange ( 10 ) ] ) #NEWLINE# self . assertFalse ( mi3 . is_ ( mi2 ) ) #NEWLINE# self . assertTrue ( mi2 . is_ ( mi ) ) #NEWLINE# mi4 = mi3 . view ( ) #NEWLINE# mi4 . set_levels ( [ [ 1 for _ in range ( 10 ) ] , lrange ( 10 ) ] , inplace = True ) #NEWLINE# self . assertFalse ( mi4 . is_ ( mi3 ) ) #NEWLINE# mi5 = mi . view ( ) #NEWLINE# mi5 . set_levels ( mi5 . levels , inplace = True ) #NEWLINE# self . assertFalse ( mi5 . is_ ( mi2 ) )