#NEWLINE# def testChangedSignal( self ) : #NEWLINE# #INDENT# c = Gaffer . Context ( ) #NEWLINE# changes = [ ] #NEWLINE# def f( context , name ) : #NEWLINE# #INDENT# self . failUnless ( context . isSame ( c ) ) #NEWLINE# changes . append ( ( name , context [ name ] ) ) #NEWLINE# #UNINDENT# cn = c . changedSignal ( ) . connect ( c ) #NEWLINE# c [ 'a' ] = 2 #NEWLINE# self . assertEqual ( changes , [ ( 'a' , 2 ) ] ) #NEWLINE# c [ 'a' ] = 3 #NEWLINE# self . assertEqual ( changes , [ ( 'a' , 2 ) , ( 'a' , 3 ) ] ) #NEWLINE# c [ 'b' ] = 1 #NEWLINE# self . assertEqual ( changes , [ ( 'a' , 2 ) , ( 'a' , 3 ) , ( 'b' , 1 ) ] ) #NEWLINE# c [ 'b' ] = 1 #NEWLINE# self . assertEqual ( changes , [ ( 'a' , 2 ) , ( 'a' , 3 ) , ( 'b' , 1 ) ] )