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

Method testHash

test/IECoreScene/PointsPrimitive.py:145–158  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

143 self.assertEqual( p.numPoints, 40 )
144
145 def testHash( self ) :
146
147 p = IECoreScene.PointsPrimitive( 1 )
148 p2 = IECoreScene.PointsPrimitive( 2 )
149
150 self.assertNotEqual( p.hash(), p2.hash() )
151 self.assertNotEqual( p.topologyHash(), p2.topologyHash() )
152
153 p3 = p2.copy()
154 self.assertEqual( p3.hash(), p2.hash() )
155 self.assertEqual( p3.topologyHash(), p2.topologyHash() )
156 p3["primVar"] = IECoreScene.PrimitiveVariable( IECoreScene.PrimitiveVariable.Interpolation.Constant, IECore.IntData( 10 ) )
157 self.assertNotEqual( p3.hash(), p2.hash() )
158 self.assertEqual( p3.topologyHash(), p2.topologyHash() )
159
160 def testBound( self ) :
161

Callers

nothing calls this directly

Calls 7

hashMethod · 0.95
topologyHashMethod · 0.95
PointsPrimitiveMethod · 0.80
PrimitiveVariableMethod · 0.80
copyMethod · 0.45
hashMethod · 0.45
topologyHashMethod · 0.45

Tested by

no test coverage detected