#NEWLINE# def test_slice( self ) : #NEWLINE# #INDENT# f = Foo ( l = [ 'zero' , 'one' , 'two' , 'three' ] ) #NEWLINE# self . assertEqual ( f . l [ 0 ] , 'zero' ) #NEWLINE# self . assertEqual ( f . l [ : 0 ] , [ ] ) #NEWLINE# self . assertEqual ( f . l [ : 1 ] , [ 'zero' ] ) #NEWLINE# self . assertEqual ( f . l [ 0 : 1 ] , [ 'zero' ] ) #NEWLINE# self . assertEqual ( f . l [ 1 : ] , [ 'one' , 'two' , 'three' ] ) #NEWLINE# self . assertEqual ( f . l [ ( - 1 ) ] , 'three' ) #NEWLINE# self . assertEqual ( f . l [ ( - 2 ) ] , 'two' ) #NEWLINE# self . assertEqual ( f . l [ : ( - 1 ) ] , [ 'zero' , 'one' , 'two' ] ) #NEWLINE# return