#NEWLINE# def test_delitem( self ) : #NEWLINE# #INDENT# a = self . type2test ( [ 0 , 1 ] ) #NEWLINE# del a [ 1 ] #NEWLINE# self . assertEqual ( a , [ 0 ] ) #NEWLINE# del a [ 0 ] #NEWLINE# self . assertEqual ( self , [ ] ) #NEWLINE# a = self . type2test ( [ 0 , 1 ] ) #NEWLINE# del a [ ( - 2 ) ] #NEWLINE# self . assertEqual ( a , [ 1 ] ) #NEWLINE# del a [ ( - 1 ) ] #NEWLINE# self . assertEqual ( a , [ ] ) #NEWLINE# a = self . type2test ( [ 0 , 1 ] ) #NEWLINE# self . assertRaises ( IndexError , a . __delitem__ , ( - 3 ) ) #NEWLINE# self . assertRaises ( IndexError , a . __delitem__ , 2 ) #NEWLINE# a = self . type2test ( [ ] ) #NEWLINE# self . assertRaises ( IndexError , a . __delitem__ , 0 ) #NEWLINE# self . assertRaises ( TypeError , a . __delitem__ )