#NEWLINE# def test_key_with_exception( self ) : #NEWLINE# #INDENT# data = list ( range ( ( - 2 ) , 2 ) ) #NEWLINE# dup = data [ : ] #NEWLINE# self . assertRaises ( ZeroDivisionError , data . sort , key = ( lambda x : ( 1 / x ) ) ) #NEWLINE# self . assertEqual ( data , dup )