#NEWLINE# @ withActionContext #NEWLINE# def test_addCallbacksErrbackToDeferred( self ) : #NEWLINE# #INDENT# "\n        L{DeferredContext.addCallbacks} passes the given errback and its\n        corresponding arguments to the wrapped L{Deferred}'s\n        C{addCallbacks}.\n        " #NEWLINE# called = [ ] #NEWLINE# def f( value , x , y ) : #NEWLINE# #INDENT# value . trap ( RuntimeError ) #NEWLINE# called . append ( ( x , y ) ) #NEWLINE# #UNINDENT# result = Deferred ( ) #NEWLINE# context = DeferredContext ( result ) #NEWLINE# context . addCallbacks ( ( lambda x : None ) , context , None , None , ( 1 , ) , { #NEWLINE# #INDENT# 'y' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# result . errback ( RuntimeError ( ) ) #NEWLINE# self . assertEqual ( called , [ ( 1 , 2 ) ] )