MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testHash

Method testHash

test/IECore/ObjectMatrixTest.py:145–160  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

143 self.assertEqual( m3, m2 )
144
145 def testHash( self ) :
146
147 m = IECore.ObjectMatrix( 1, 1 )
148 h = m.hash()
149
150 m[0, 0] = IECore.IntData( 10 )
151 self.assertNotEqual( m.hash(), h )
152
153 m1 = IECore.ObjectMatrix( 2, 1 )
154 m1[0, 0] = IECore.StringData( "A" )
155 m1[1, 0] = IECore.FloatData( 2.0 )
156
157 m2 = IECore.ObjectMatrix( 1, 2 )
158 m2[0, 0] = IECore.StringData( "A" )
159 m2[0, 1] = IECore.FloatData( 2.0 )
160 self.assertNotEqual( m1.hash(), m2.hash() )
161
162 def testRepr( self ) :
163

Callers

nothing calls this directly

Calls 2

hashMethod · 0.95
ObjectMatrixMethod · 0.80

Tested by

no test coverage detected