

def testReloadRefreshesMetadata(self):
    s = Gaffer.ScriptNode()
    s['b'] = Gaffer.Box()
    s['b']['p'] = Gaffer.Plug(flags=(Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic))
    s['b'].exportForReference('/tmp/test.grf')
    s['r'] = Gaffer.Reference()
    s['r'].load('/tmp/test.grf')
    self.assertEqual(Gaffer.Metadata.plugValue(self['r']['p'], 'test'), None)
    Gaffer.Metadata.registerPlugValue(s['b']['p'], 'test', 10)
    s['b'].exportForReference('/tmp/test.grf')
    s['r'].load('/tmp/test.grf')
    self.assertEqual(Gaffer.Metadata.plugValue(s['r']['p'], 'test'), 10)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/ReferenceTest.py ReferenceTest.testReloadRefreshesMetadata/VarMisuse@103/157 `s`->`self`