def test_basic_transform(self): transform, sphere = cmds.sphere() attr = transform + '.translateX' with ctx.attrs({attr: 1}) as original: self.assertEqual(original.get(attr), 0) self.assertEqual(cmds.getAttr(attr), 1) self.assertEqual(cmds.getAttr(attr), 0)
def test_mutate_transform(self): transform, sphere = cmds.sphere() attr = transform + '.translateX' with ctx.attrs({attr: 1}) as original: original[attr] = 2 self.assertEqual(cmds.getAttr(attr), 1) self.assertEqual(cmds.getAttr(attr), 2)