#NEWLINE# def test_mutation( self ) : #NEWLINE# #INDENT# d = range ( n ) #NEWLINE# it = reversed ( d ) #NEWLINE# it . next ( ) #NEWLINE# it . next ( ) #NEWLINE# self . assertEqual ( len ( it ) , ( n - 2 ) ) #NEWLINE# d . append ( n ) #NEWLINE# self . assertEqual ( len ( it ) , ( n - 2 ) ) #NEWLINE# d [ 1 : ] = [ ] #NEWLINE# self . assertEqual ( len ( it ) , 0 ) #NEWLINE# self . assertEqual ( list ( it ) , [ ] ) #NEWLINE# d . extend ( xrange ( 20 ) ) #NEWLINE# self . assertEqual ( len ( it ) , 0 )