

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

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/MetadataTest.py MetadataTest.testPlugSignals/VarMisuse@57/98 `self`->`ns`