#NEWLINE# def testContextGetFrameMethod( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'n' ] = GafferTest . AddNode ( ) #NEWLINE# s [ 'n' ] [ 'op1' ] . setValue ( 0 ) #NEWLINE# s [ 'e' ] = Gaffer . Expression ( ) #NEWLINE# s [ 'e' ] . setExpression ( "parent['n']['op2'] = int( context.getFrame() )" , 'python' ) #NEWLINE# with Gaffer . Context ( ) as c : #NEWLINE# #INDENT# for i in range ( 0 , 10 ) : #NEWLINE# #INDENT# c . setFrame ( i ) #NEWLINE# self . assertEqual ( s [ 'n' ] [ 'sum' ] . getValue ( ) , i )