

def testPlugFlagsOnReload(self):
    s = Gaffer.ScriptNode()
    s['b'] = Gaffer.Box()
    s['b']['s'] = GafferTest.SphereNode()
    s['b']['a'] = GafferTest.AddNode()
    s['b'].exportForReference('/tmp/test.grf')
    s2 = Gaffer.ScriptNode()
    s2['r'] = Gaffer.Reference()
    s2['r'].load('/tmp/test.grf')
    s2['r']['__pluggy'] = Gaffer.CompoundPlug(flags=(Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    s2['r']['__pluggy']['int'] = Gaffer.IntPlug(flags=(Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    s2['r']['__pluggy']['compound'] = Gaffer.CompoundPlug(flags=(Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    s2['r']['__pluggy']['compound']['int'] = Gaffer.IntPlug(flags=(Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    s.assertEqual(s2['r']['__pluggy'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    self.assertEqual(s2['r']['__pluggy']['int'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    self.assertEqual(s2['r']['__pluggy']['compound'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    self.assertEqual(s2['r']['__pluggy']['compound']['int'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    s2['r'].load('/tmp/test.grf')
    self.assertEqual(s2['r']['__pluggy'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    self.assertEqual(s2['r']['__pluggy']['int'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    self.assertEqual(s2['r']['__pluggy']['compound'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))
    self.assertEqual(s2['r']['__pluggy']['compound']['int'].getFlags(), (Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Default))

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/ReferenceTest.py ReferenceTest.testPlugFlagsOnReload/VarMisuse@240/370 `self`->`s`