

def testNodeSignals(self):
    ns = GafferTest.CapturingSlot(Gaffer.Metadata.nodeValueChangedSignal())
    ps = GafferTest.CapturingSlot(Gaffer.Metadata.plugValueChangedSignal())
    Gaffer.Metadata.registerNodeValue(GafferTest.AddNode, 'k', 'something')
    self.assertEqual(len(ps), 0)
    self.assertEqual(len(ns), 1)
    self.assertEqual(ns[0], (GafferTest.AddNode.staticTypeId(), 'k', None))
    Gaffer.Metadata.registerNodeValue(GafferTest.AddNode, 'k', 'somethingElse')
    self.assertEqual(len(ps), 0)
    self.assertEqual(len(ns), 2)
    self.assertEqual(ns[1], (GafferTest.AddNode.staticTypeId(), 'k', None))

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/MetadataTest.py MetadataTest.testNodeSignals/original