

def testHashPassThrough(self):
    n = GafferImage.ImageReader()
    n['fileName'].setValue(self.imageFile)
    o = GafferImage.LUT()
    o['in'].setInput(n['out'])
    self.assertEqual(n['out'].image(), o['out'].image())
    o['fileName'].setValue(self.lut)
    self.assertNotEqual(n['out'].image(), o['out'].image())
    o['enabled'].setValue(False)
    self.assertEqual(n['out'].image(), o['out'].image())
    self.assertEqual(n['out']['format'].hash(), o['out']['format'].hash())
    self.assertEqual(n['out']['dataWindow'].hash(), o['out']['dataWindow'].hash())
    self.assertEqual(n['out']['metadata'].getValue(), o['out']['metadata'].getValue())
    self.assertEqual(n['out']['channelNames'].hash(), o['out']['channelNames'].hash())
    o['enabled'].setValue(True)
    o['fileName'].setValue('')
    self.assertEqual(n['out'].image(), o['out'].image())
    self.assertEqual(n['out']['format'].hash(), o['out']['format'].hash())
    self.assertEqual(n['out']['dataWindow'].hash(), o['out']['dataWindow'].hash())
    self.assertEqual(n['out']['metadata'].getValue(), o['out']['metadata'].getValue())
    self.assertEqual(n['out']['channelNames'].hash(), o['out']['channelNames'].hash())

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageTest/LUTTest.py LUTTest.testHashPassThrough/original