

def testDefaultValueClashes(self):
    s = Gaffer.ScriptNode()
    s['b'] = Gaffer.Box()
    s['b']['n'] = GafferTest.AddNode()
    p = s['b'].promotePlug(s['b']['n']['op1'])
    p.setValue(10)
    s['b'].exportForReference('/tmp/test.grf')
    s2 = Gaffer.ScriptNode()
    s2['r'] = Gaffer.Reference()
    s2['r'].load('/tmp/test.grf')
    p2 = s2['r'].descendant(p.relativeName(s['b']))
    self.assertEqual(p2.getValue(), 10)
    p2.setToDefault()
    self.assertEqual(p2.getValue(), p2.defaultValue())
    s2['fileName'].setValue('/tmp/test.gfr')
    s2.save()
    s3 = Gaffer.ScriptNode()
    s3['fileName'].setValue('/tmp/test.gfr')
    s3.load()
    p3 = s3['r'].descendant(p.relativeName(s['b']))
    self.assertEqual(p3.getValue(), p3.defaultValue())

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/ReferenceTest.py ReferenceTest.testDefaultValueClashes/original