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

Method testSetClass

test/IECore/ClassParameterTest.py:94–108  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

92 self.assertEqual( cl(), IECore.IntData( 200 ) )
93
94 def testSetClass( self ) :
95
96 c = IECore.ClassParameter(
97 "n",
98 "d",
99 "IECORE_OP_PATHS",
100 os.path.join( "maths", "multiply" ),
101 2
102 )
103
104 self.assertEqual( c.keys(), [ "a", "b" ] )
105
106 c.setClass( "stringParsing", 1 )
107
108 self.assertEqual( c.keys(), [ "emptyString", "normalString", "stringWithSpace", "stringWithManySpaces" ] )
109
110 def testSetNoClass( self ) :
111

Callers

nothing calls this directly

Calls 3

setClassMethod · 0.95
joinMethod · 0.80
keysMethod · 0.45

Tested by

no test coverage detected