

def testSerialisation(self):
    s = Gaffer.ScriptNode()
    s['n'] = GafferTest.AddNode()
    Gaffer.Metadata.registerNodeValue(s['n'], 'serialisationTest', 1)
    Gaffer.Metadata.registerPlugValue(s['n']['op1'], 'serialisationTest', 2)
    s2 = Gaffer.ScriptNode()
    s2.execute(s.serialise())
    self.assertEqual(Gaffer.Metadata.nodeValue(s2['n'], 'serialisationTest'), 1)
    self.assertEqual(Gaffer.Metadata.plugValue(s2['n']['op1'], 'serialisationTest'), 2)

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