#NEWLINE# def test( self ) : #NEWLINE# #INDENT# s = GafferScene . Sphere ( ) #NEWLINE# p = GafferScene . PrimitiveVariables ( ) #NEWLINE# p [ 'in' ] . setInput ( s [ 'out' ] ) #NEWLINE# self . assertScenesEqual ( s [ 'out' ] , p [ 'out' ] ) #NEWLINE# self . assertSceneHashesEqual ( s [ 'out' ] , o1 [ 'out' ] ) #NEWLINE# p [ 'primitiveVariables' ] . addMember ( 'a' , IECore . IntData ( 10 ) ) #NEWLINE# self . assertScenesEqual ( s [ 'out' ] , p [ 'out' ] , childPlugNamesToIgnore = ( 'object' , ) ) #NEWLINE# self . assertSceneHashesEqual ( s [ 'out' ] , p [ 'out' ] , childPlugNamesToIgnore = ( 'object' , ) ) #NEWLINE# self . assertNotEqual ( s [ 'out' ] . objectHash ( '/sphere' ) , p [ 'out' ] . objectHash ( '/sphere' ) ) #NEWLINE# self . assertNotEqual ( s [ 'out' ] . object ( '/sphere' ) , p [ 'out' ] . object ( '/sphere' ) ) #NEWLINE# o1 = s [ 'out' ] . object ( '/sphere' ) #NEWLINE# o2 = p [ 'out' ] . object ( '/sphere' ) #NEWLINE# self . assertEqual ( set ( ( o1 . keys ( ) + [ 'a' ] ) ) , set ( o2 . keys ( ) ) ) #NEWLINE# self . assertEqual ( o2 [ 'a' ] , IECore . PrimitiveVariable ( IECore . PrimitiveVariable . Interpolation . Constant , IECore . IntData ( 10 ) ) ) #NEWLINE# del o2 [ 'a' ] #NEWLINE# self . assertEqual ( o1 , o2 )