#NEWLINE# def testLegacyLoading( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'fileName' ] . setValue ( ( os . path . dirname ( __file__ ) + '/scripts/legacyExpression.gfr' ) ) #NEWLINE# with IECore . CapturingMessageHandler ( ) as mh : #NEWLINE# #INDENT# s . load ( continueOnError = True ) #NEWLINE# #UNINDENT# self . assertEqual ( len ( mh . messages ) , 1 ) #NEWLINE# self . assertTrue ( ( 'rejects input ' in self . messages [ 0 ] . message ) ) #NEWLINE# s . context ( ) . setFrame ( 3 ) #NEWLINE# with s . context ( ) : #NEWLINE# #INDENT# self . assertEqual ( s [ 'n' ] [ 'user' ] [ 'o' ] . getValue ( ) , 6 )