#NEWLINE# def __exit__( self , exc_type , exc_value , tb ) : #NEWLINE# #INDENT# if ( exc_type is None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# exc_name = tb . expected . __name__ #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# exc_name = str ( self . expected ) #NEWLINE# #UNINDENT# raise self . failureException ( '{0} not raised' . format ( exc_name ) ) #NEWLINE# #UNINDENT# if ( not issubclass ( exc_type , self . expected ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# self . exception = exc_value #NEWLINE# return True