#NEWLINE# def test_assert_fails_with_success( self ) : #NEWLINE# #INDENT# marker = object ( ) #NEWLINE# d = assert_fails_with ( defer . succeed ( marker ) , RuntimeError ) #NEWLINE# def check_result( failure ) : #NEWLINE# #INDENT# failure . trap ( self . failureException ) #NEWLINE# self . assertThat ( str ( failure . value ) , Equals ( ( 'RuntimeError not raised (%r returned)' % ( marker , ) ) ) ) #NEWLINE# #UNINDENT# d . addCallbacks ( ( lambda x : self . fail ( 'Should not have succeeded' ) ) , self ) #NEWLINE# return d