#NEWLINE# def test_override( self ) : #NEWLINE# #INDENT# b = self . ctx [ B ] = 1 #NEWLINE# c = self . ctx [ C ] = 2 #NEWLINE# self . assertEqual ( self . ctx [ A ] , b ) #NEWLINE# self . assertEqual ( num_calls_A , 1 ) #NEWLINE# self . assertEqual ( num_calls_A_override , 0 ) #NEWLINE# self . ctx [ A ] = A_override #NEWLINE# self . assertEqual ( self . ctx [ A ] , c ) #NEWLINE# self . assertEqual ( num_calls_A , 1 ) #NEWLINE# self . assertEqual ( num_calls_A_override , 1 ) #NEWLINE# c = self . ctx [ C ] = 100 #NEWLINE# self . assertEqual ( self . ctx [ A ] , c ) #NEWLINE# self . assertEqual ( num_calls_A , 1 ) #NEWLINE# self . assertEqual ( num_calls_A_override , 2 ) #NEWLINE# b = self . ctx [ B ] = 500 #NEWLINE# self . assertEqual ( self . ctx [ A ] , c ) #NEWLINE# self . assertEqual ( num_calls_A , 1 ) #NEWLINE# self . assertEqual ( num_calls_A_override , 2 )