#NEWLINE# def assertImageHashesEqual( self , imageA , imageB ) : #NEWLINE# #INDENT# self . assertEqual ( imageA [ 'format' ] . hash ( ) , imageB [ 'format' ] . hash ( ) ) #NEWLINE# self . assertEqual ( imageA [ 'dataWindow' ] . hash ( ) , imageB [ 'dataWindow' ] . hash ( ) ) #NEWLINE# self . assertEqual ( imageA [ 'metadata' ] . hash ( ) , imageB [ 'metadata' ] . hash ( ) ) #NEWLINE# self . assertEqual ( imageA [ 'channelNames' ] . hash ( ) , imageB [ 'channelNames' ] . hash ( ) ) #NEWLINE# dataWindow = imageA [ 'dataWindow' ] . getValue ( ) #NEWLINE# self . assertEqual ( dataWindow , imageB [ 'dataWindow' ] . getValue ( ) ) #NEWLINE# channelNames = imageA [ 'channelNames' ] . getValue ( ) #NEWLINE# self . assertEqual ( channelNames , imageB [ 'channelNames' ] . getValue ( ) ) #NEWLINE# tileOrigin = GafferImage . ImagePlug . tileOrigin ( dataWindow . min ) #NEWLINE# while ( tileOrigin . y < dataWindow . max . y ) : #NEWLINE# #INDENT# tileOrigin . x = GafferImage . ImagePlug . tileOrigin ( dataWindow . min ) . x #NEWLINE# while ( tileOrigin . x < dataWindow . max . x ) : #NEWLINE# #INDENT# for channelName in channelNames : #NEWLINE# #INDENT# self . assertEqual ( imageA . channelDataHash ( channelName , tileOrigin ) , imageB . channelDataHash ( channelName , tileOrigin ) ) #NEWLINE# #UNINDENT# tileOrigin . x += GafferImage . ImagePlug . tileSize ( ) #NEWLINE# #UNINDENT# tileOrigin . y += GafferImage . ImagePlug . tileSize ( )