

def testReloadOldReference(self):
    s = Gaffer.ScriptNode()
    s['r'] = Gaffer.Reference()
    s['r'].load((os.path.dirname(__file__) + '/references/version-0.8.0.0.grf'))
    self.assertFalse(s['r']['user']['promoted'].getFlags(Gaffer.Plug.Flags.Dynamic))
    self.assertEqual(s['r']['user']['promoted'].defaultValue(), False)
    self.assertEqual(s['r']['user']['promoted'].getValue(), True)
    s['r']['user']['promoted'].setValue(False)
    self.assertFalse(s['r']['user']['promoted'].getFlags(Gaffer.Plug.Flags.Dynamic))
    self.assertEqual(s['r']['user']['promoted'].defaultValue(), False)
    self.assertEqual(s['r']['user']['promoted'].getValue(), False)
    s['r'].load((os.path.dirname(__file__) + '/references/version-0.8.0.0.grf'))
    self.assertFalse(s['r']['user']['promoted'].getFlags(Gaffer.Plug.Flags.Dynamic))
    self.assertEqual(s['r']['user']['promoted'].defaultValue(), False)
    s.assertEqual(s['r']['user']['promoted'].getValue(), False)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/ReferenceTest.py ReferenceTest.testReloadOldReference/VarMisuse@278/417 `self`->`s`