#NEWLINE# def match( self , failure ) : #NEWLINE# #INDENT# for cause in failure : #NEWLINE# #INDENT# if ( cause . check ( self . exc_class ) is not None ) : #NEWLINE# #INDENT# return matchers . MatchesRegex ( self . pattern ) . match ( cause . exception_str ) #NEWLINE# #UNINDENT# #UNINDENT# return matchers . Mismatch ( ( "The `%s` wasn't caused by the `%s`" % ( failure , self . exc_class ) ) )