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

Method testSimple

test/IECore/DataPromoteOp.py:65–71  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

63 self.assertEqual( op( object = self.__makeVectorSourceData( IECore.HalfVectorData ), targetType=int(IECore.TypeId.V2fVectorData) ), IECore.V2fVectorData( [ imath.V2f( x ) for x in v ] ) )
64
65 def testSimple( self ) :
66
67 op = IECore.DataPromoteOp()
68
69 self.assertEqual( op( object = IECore.IntData(2), targetType=int(IECore.TypeId.V3fData) ), IECore.V3fData( imath.V3f(2.0) ) )
70 self.assertEqual( op( object = IECore.IntData(2), targetType=int(IECore.TypeId.V3dData) ), IECore.V3dData( imath.V3d(2.0) ) )
71 self.assertEqual( op( object = IECore.IntData(2), targetType=int(IECore.TypeId.Color3fData) ), IECore.Color3fData( imath.Color3f(2.0) ) )
72
73if __name__ == "__main__":
74 unittest.main()

Callers

nothing calls this directly

Calls 1

DataPromoteOpMethod · 0.80

Tested by

no test coverage detected