#NEWLINE# def test_reversed( self ) : #NEWLINE# #INDENT# a = self . type2test ( range ( 20 ) ) #NEWLINE# r = reversed ( a ) #NEWLINE# self . assertEqual ( list ( r ) , self . type2test ( range ( 19 , ( - 1 ) , ( - 1 ) ) ) ) #NEWLINE# self . assertRaises ( StopIteration , next , a ) #NEWLINE# self . assertEqual ( list ( reversed ( self . type2test ( ) ) ) , self . type2test ( ) ) #NEWLINE# self . assertRaises ( TypeError , len , reversed ( [ 1 , 2 , 3 ] ) )