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

Method testHash

test/IECore/CompoundObject.py:158–173  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

156 self.assertTrue( "a" not in IECore.CompoundObject.defaultInstance() )
157
158 def testHash( self ) :
159
160 o1 = IECore.CompoundObject()
161 o2 = IECore.CompoundObject()
162
163 o1["a"] = IECore.StringData( "a" )
164 o1["b"] = IECore.StringData( "b" )
165
166 o2["b"] = IECore.StringData( "b" )
167 o2["a"] = IECore.StringData( "a" )
168
169 self.assertEqual( o1.hash(), o2.hash() )
170
171 o2["c"] = IECore.StringData( "c" )
172
173 self.assertNotEqual( o1.hash(), o2.hash() )
174
175 def testHashIndependentFromOrderOfConstruction( self ) :
176

Callers

nothing calls this directly

Calls 2

hashMethod · 0.95
CompoundObjectMethod · 0.80

Tested by

no test coverage detected