#NEWLINE# def testAffects( self ) : #NEWLINE# #INDENT# c1 = GafferImage . Constant ( ) #NEWLINE# c2 = GafferImage . Constant ( ) #NEWLINE# m = GafferImage . Merge ( ) #NEWLINE# m [ 'in' ] [ 0 ] . setInput ( c1 [ 'out' ] ) #NEWLINE# m [ 'in' ] [ 1 ] . setInput ( c2 [ 'out' ] ) #NEWLINE# cs = GafferTest . CapturingSlot ( m . plugDirtiedSignal ( ) ) #NEWLINE# c1 [ 'color' ] [ 'r' ] . setValue ( 0.1 ) #NEWLINE# self . assertEqual ( len ( cs ) , 5 ) #NEWLINE# self . assertTrue ( cs [ 0 ] [ 0 ] . isSame ( m [ 'in' ] [ 0 ] [ 'channelData' ] ) ) #NEWLINE# self . assertTrue ( cs [ 1 ] [ 0 ] . isSame ( m [ 'in' ] [ 0 ] ) ) #NEWLINE# self . assertTrue ( cs [ 2 ] [ 0 ] . isSame ( m [ 'in' ] ) ) #NEWLINE# self . assertTrue ( cs [ 3 ] [ 0 ] . isSame ( m [ 'out' ] [ 'channelData' ] ) ) #NEWLINE# self . assertTrue ( cs [ 4 ] [ 0 ] . isSame ( m [ 'out' ] ) ) #NEWLINE# del cs [ : ] #NEWLINE# c2 [ 'color' ] [ 'g' ] . setValue ( 0.2 ) #NEWLINE# self . assertEqual ( len ( cs ) , 5 ) #NEWLINE# self . assertTrue ( cs [ 0 ] [ 0 ] . isSame ( m [ 'in' ] [ 1 ] [ 'channelData' ] ) ) #NEWLINE# self . assertTrue ( cs [ 1 ] [ 0 ] . isSame ( m [ 'in' ] [ 1 ] ) ) #NEWLINE# self . assertTrue ( cs [ 2 ] [ 0 ] . isSame ( m [ 'in' ] ) ) #NEWLINE# self . assertTrue ( cs [ 3 ] [ 0 ] . isSame ( m [ 'out' ] [ 'channelData' ] ) ) #NEWLINE# self . assertTrue ( cs [ 4 ] [ 0 ] . isSame ( m [ 'out' ] ) )