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

Method testErrors

test/IECoreScene/TriangulateOp.py:159–185  ·  view source on GitHub ↗

Test TriangulateOp with invalid P data

( self )

Source from the content-addressed store, hash-verified

157 self.assertEqual( m, result )
158
159 def testErrors( self ):
160 """ Test TriangulateOp with invalid P data """
161
162 verticesPerFace = IECore.IntVectorData()
163 verticesPerFace.append( 4 )
164
165 vertexIds = IECore.IntVectorData()
166 vertexIds.append( 0 )
167 vertexIds.append( 1 )
168 vertexIds.append( 2 )
169 vertexIds.append( 3 )
170
171 P = IECore.FloatVectorData()
172 P.append( 1 )
173 P.append( 2 )
174 P.append( 3 )
175 P.append( 4 )
176
177 m = IECoreScene.MeshPrimitive( verticesPerFace, vertexIds )
178 m["P"] = IECoreScene.PrimitiveVariable( IECoreScene.PrimitiveVariable.Interpolation.Vertex, P )
179
180 op = IECoreScene.TriangulateOp()
181
182 op["input"] = m
183
184 # FloatVectorData not valid for "P"
185 self.assertRaises( RuntimeError, op )
186
187 def testConstantPrimVars( self ) :
188

Callers

nothing calls this directly

Calls 4

appendMethod · 0.80
PrimitiveVariableMethod · 0.80
TriangulateOpMethod · 0.80
MeshPrimitiveMethod · 0.45

Tested by

no test coverage detected