

def testNoSerialiseAfterUndo(self):
    s = Gaffer.ScriptNode()
    s['n'] = Gaffer.Node()
    self.assertFalse(('Metadata' in s.serialise()))
    with Gaffer.UndoContext(s):
        Gaffer.Metadata.registerNodeValue(s['n'], 'test', 1)
    self.assertTrue(('Metadata' in self.serialise()))
    s.undo()
    self.assertFalse(('Metadata' in s.serialise()))

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferTest/MetadataTest.py MetadataTest.testNoSerialiseAfterUndo/VarMisuse@78/112 `s`->`self`