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

Method testOperateWithArgs

test/IECore/Op.py:157–163  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

155 self.assertTrue( op.isInstanceOf( PythonOp.staticTypeId() ), True )
156
157 def testOperateWithArgs( self ) :
158
159 op = PythonOp()
160 # make sure we can call the op passing all the parameter values as a CompoundObject
161 self.assertEqual( op( IECore.CompoundObject( { "name": IECore.StringData("jim") } ) ), IECore.StringData( "jim" ) )
162 # make sure the last call did not affect the contents of the Op's parameters.
163 self.assertEqual( op.parameters()['name'].getTypedValue(), "john" )
164
165if __name__ == "__main__":
166 unittest.main()

Callers

nothing calls this directly

Calls 3

CompoundObjectMethod · 0.80
PythonOpClass · 0.70
parametersMethod · 0.45

Tested by

no test coverage detected