#NEWLINE# @ unittest . skipIf ( ( GafferOSL . oslLibraryVersionCode ( ) < 10600 ) , "OSL doesn't support array metadata" ) #NEWLINE# def testMetadataReuse( self ) : #NEWLINE# #INDENT# s = self . compileShader ( ( os . path . dirname ( __file__ ) + '/shaders/arrayMetadata.osl' ) ) #NEWLINE# n1 = GafferOSL . OSLShader ( ) #NEWLINE# n1 . loadShader ( s ) #NEWLINE# n2 = GafferOSL . OSLShader ( ) #NEWLINE# n2 . loadShader ( n1 ) #NEWLINE# self . assertTrue ( n1 . parameterMetadata ( n1 [ 'parameters' ] [ 'a' ] , 'aStringValues' , _copy = False ) . isSame ( n2 . parameterMetadata ( n2 [ 'parameters' ] [ 'a' ] , 'aStringValues' , _copy = False ) ) ) #NEWLINE# n1 . parameterMetadata ( n1 [ 'parameters' ] [ 'a' ] , 'aStringValues' ) . value = 'editingSharedConstDataIsABadIdea' #NEWLINE# self . assertEqual ( n1 . parameterMetadata ( n1 [ 'parameters' ] [ 'a' ] , 'aStringValues' ) , IECore . StringVectorData ( [ 'one' , 'two' ] ) )