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

Method testScaling

test/IECore/DataConvertOpTest.py:42–56  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

40class DataConvertOpTest( unittest.TestCase ) :
41
42 def testScaling( self ) :
43
44 o = IECore.DataConvertOp()(
45
46 data = IECore.FloatVectorData( [ 0, 0.5, 1 ] ),
47 targetType = IECore.UCharVectorData.staticTypeId()
48
49 )
50
51 self.assertEqual(
52
53 o,
54 IECore.UCharVectorData( [ 0, 128, 255 ] )
55
56 )
57
58 def testDimensionUpConversion( self ) :
59

Callers

nothing calls this directly

Calls 2

DataConvertOpMethod · 0.80
staticTypeIdMethod · 0.80

Tested by

no test coverage detected