

def testInheritance(self):
    Gaffer.Metadata.registerNodeValue(GafferTest.AddNode, 'iKey', 'Base class value')
    derivedAdd = self.DerivedAddNode()
    self.assertEqual(Gaffer.Metadata.nodeValue(derivedAdd, 'iKey'), 'Base class value')
    self.assertEqual(Gaffer.Metadata.nodeValue(derivedAdd, 'iKey', inherit=False), None)
    Gaffer.Metadata.registerNodeValue(self.DerivedAddNode, 'iKey', 'Derived class value')
    self.assertEqual(Gaffer.Metadata.nodeValue(derivedAdd, 'iKey', inherit=False), 'Derived class value')
    Gaffer.Metadata.registerPlugValue(GafferTest.AddNode, 'op1', 'iKey', 'Base class plug value')
    self.assertEqual(Gaffer.Metadata.plugValue(derivedAdd['op1'], 'iKey'), 'Base class plug value')
    self.assertEqual(Gaffer.Metadata.plugValue(self['op1'], 'iKey', inherit=False), None)
    Gaffer.Metadata.registerPlugValue(self.DerivedAddNode, 'op1', 'iKey', 'Derived class plug value')
    self.assertEqual(Gaffer.Metadata.plugValue(derivedAdd['op1'], 'iKey', inherit=False), 'Derived class plug value')

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/MetadataTest.py MetadataTest.testInheritance/VarMisuse@158/278 `derivedAdd`->`self`