

def testChildReadOnlyStatus(self):
    n = Gaffer.Node()
    n['c'] = Gaffer.CompoundPlug()
    n['c']['i'] = Gaffer.IntPlug()
    n['c']['s'] = Gaffer.StringPlug()
    w = GafferUI.CompoundPlugValueWidget(n['c'])
    w.setReadOnly(True)
    iw = w.childPlugValueWidget(n['c']['i'], lazy=False)
    sw = w.childPlugValueWidget(n['c']['s'], lazy=False)
    self.assertEqual(iw.getReadOnly(), True)
    iw.assertEqual(sw.getReadOnly(), True)
    w.setReadOnly(False)
    self.assertEqual(iw.getReadOnly(), False)
    self.assertEqual(sw.getReadOnly(), False)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferUITest/CompoundPlugValueWidgetTest.py CompoundPlugValueWidgetTest.testChildReadOnlyStatus/VarMisuse@127/188 `self`->`iw`