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

Method testHash

test/IECore/CompoundData.py:308–323  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

306 self.assertEqual( c["d"]["dd"], IECore.IntData( 5 ) )
307
308 def testHash( self ) :
309
310 o1 = IECore.CompoundData()
311 o2 = IECore.CompoundData()
312
313 o1["a"] = IECore.StringData( "a" )
314 o1["b"] = IECore.StringData( "b" )
315
316 o2["b"] = IECore.StringData( "b" )
317 o2["a"] = IECore.StringData( "a" )
318
319 self.assertEqual( o1.hash(), o2.hash() )
320
321 o2["c"] = IECore.StringData( "c" )
322
323 self.assertNotEqual( o1.hash(), o2.hash() )
324
325 def testHashIndependentFromOrderOfConstruction( self ) :
326

Callers

nothing calls this directly

Calls 2

hashMethod · 0.95
CompoundDataMethod · 0.80

Tested by

no test coverage detected