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

Method testFindClasses

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

Source from the content-addressed store, hash-verified

40class ParameterAlgoTest( unittest.TestCase ) :
41
42 def testFindClasses( self ) :
43
44 p = IECore.CompoundParameter(
45
46 name = "p",
47 description = "",
48
49 members = [
50
51 IECore.CompoundParameter(
52
53 name = "q",
54 description = "",
55 members = [
56
57 IECore.ClassVectorParameter(
58
59 "cv",
60 "d",
61 "IECORE_OP_PATHS",
62 [
63 ( "mult", os.path.join( "maths", "multiply" ), 2 ),
64 ( "coIO", "compoundObjectInOut", 2 ),
65 ]
66
67 ),
68
69 IECore.ClassParameter(
70
71 "c",
72 "d",
73 "IECORE_OP_PATHS",
74 "classParameterTest", 1
75
76 )
77
78 ]
79
80 ),
81
82
83 ]
84
85 )
86
87 p["q"]["c"]["cp"].setClass( "classVectorParameterTest", 1 )
88
89 p["q"]["c"]["cp"]["cv"].setClasses( [
90 ( "mult", os.path.join( "maths", "multiply" ), 2 ),
91 ( "coIO", "compoundObjectInOut", 2 )
92 ] )
93
94 c = IECore.ParameterAlgo.findClasses( p )
95
96 expected = [
97
98 {
99 "parent" : p["q"]["cv"],

Callers

nothing calls this directly

Calls 6

CompoundParameterMethod · 0.80
joinMethod · 0.80
setClassesMethod · 0.80
getClassesMethod · 0.80
setClassMethod · 0.45
getClassMethod · 0.45

Tested by

no test coverage detected