#NEWLINE# def test_get( self ) : #NEWLINE# #INDENT# lb = self . create ( ) #NEWLINE# lb . insert ( 0 , * ( ( 'el%d' % i ) for i in range ( 8 ) ) ) #NEWLINE# self . assertEqual ( lb . get ( 0 ) , 'el0' ) #NEWLINE# self . assertEqual ( lb . get ( 3 ) , 'el3' ) #NEWLINE# self . assertEqual ( lb . get ( 'end' ) , 'el7' ) #NEWLINE# self . assertEqual ( lb . get ( 8 ) , '' ) #NEWLINE# self . assertEqual ( lb . get ( ( - 1 ) ) , '' ) #NEWLINE# self . assertEqual ( lb . get ( 3 , 5 ) , ( 'el3' , 'el4' , 'el5' ) ) #NEWLINE# self . assertEqual ( lb . get ( 5 , 'end' ) , ( 'el5' , 'el6' , 'el7' ) ) #NEWLINE# self . assertEqual ( lb . get ( 5 , 0 ) , ( ) ) #NEWLINE# self . assertEqual ( lb . get ( 0 , 0 ) , ( 'el0' , ) ) #NEWLINE# self . assertRaises ( TclError , lb . get , 'noindex' ) #NEWLINE# self . assertRaises ( TclError , lb . get , None ) #NEWLINE# self . assertRaises ( TypeError , lb . get ) #NEWLINE# self . assertRaises ( TclError , lb . get , 'end' , 'noindex' ) #NEWLINE# self . assertRaises ( TypeError , lb . get , 1 , 2 , 3 ) #NEWLINE# self . assertRaises ( TclError , lb . get , 2.4 )