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

Method testSetGet

test/IECore/Parameters.py:358–366  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

356 self.assertEqual( p.presetValues(), ( IECore.IntData( 10 ), IECore.IntData( 1 ), IECore.IntData( 20 ), IECore.IntData( 30 ) ) )
357
358 def testSetGet( self ) :
359
360 p = IECore.IntParameter( "name", "description", 1 )
361 p.setValue( IECore.IntData( 10 ) )
362 self.assertEqual( p.getValue(), IECore.IntData( 10 ) )
363 self.assertEqual( p.getNumericValue(), 10 )
364 p.setNumericValue( 20 )
365 self.assertEqual( p.getValue(), IECore.IntData( 20 ) )
366 self.assertEqual( p.getNumericValue(), 20 )
367
368 def testSmartSetValue( self ):
369 """Test python overwriting: smartSetValue()"""

Callers

nothing calls this directly

Calls 4

getNumericValueMethod · 0.80
setNumericValueMethod · 0.80
setValueMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected