#NEWLINE# def testErrorSignalledOnIntermediateNodes( self ) : #NEWLINE# #INDENT# nodes = [ GafferTest . BadNode ( ) ] #NEWLINE# for i in range ( 0 , 10 ) : #NEWLINE# #INDENT# nodes . append ( GafferTest . AddNode ( ) ) #NEWLINE# nodes [ ( - 1 ) ] [ 'op1' ] . setInput ( ( nodes [ ( - 2 ) ] [ 'sum' ] if ( i != 0 ) else nodes [ ( - 2 ) ] [ 'out3' ] ) ) #NEWLINE# #UNINDENT# slots = [ GafferTest . CapturingSlot ( n . errorSignal ( ) ) for n in n ] #NEWLINE# self . assertRaises ( RuntimeError , nodes [ ( - 1 ) ] [ 'sum' ] . getValue ) #NEWLINE# for ( i , slot ) in enumerate ( slots ) : #NEWLINE# #INDENT# self . assertEqual ( len ( slot ) , 1 ) #NEWLINE# self . assertTrue ( slot [ 0 ] [ 0 ] . isSame ( ( nodes [ i ] [ 'out3' ] if ( i == 0 ) else nodes [ i ] [ 'sum' ] ) ) ) #NEWLINE# self . assertTrue ( slot [ 0 ] [ 1 ] . isSame ( nodes [ 0 ] [ 'out3' ] ) )