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

Method testSets

test/IECoreVDB/SceneInterfaceTest.py:175–194  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

173 )
174
175 def testSets( self ):
176 # VDB Scene doesn't support sets and it should return an empty set
177 # and the hash should be unchanging for any location / setname / vdb file
178 sourcePath = os.path.join(self.dataDir, "sphere.vdb")
179 sphereRoot = IECoreScene.SceneInterface.create( sourcePath, IECore.IndexedIO.OpenMode.Read )
180
181 vdb = sphereRoot.child( "vdb" )
182
183 # we don't support sets in vdb scenes
184 self.assertEqual( vdb.setNames(), [] )
185
186 # all locations should have the same setHash
187 self.assertEqual( vdb.hashSet("a"), sphereRoot.hashSet("b") )
188
189 sourcePath = os.path.join(self.dataDir, "smoke.vdb")
190 smokeRoot = IECoreScene.SceneInterface.create( sourcePath, IECore.IndexedIO.OpenMode.Read )
191
192 vdb2 = smokeRoot.child( "vdb" )
193 self.assertEqual( vdb.hashSet("c"), vdb2.hashSet("d") )
194 self.assertEqual( vdb2.hashSet("f"), smokeRoot.hashSet("e") )
195
196 def testMissingChildBehaviour( self ) :
197 with self.assertRaises(RuntimeError):

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
createMethod · 0.45
childMethod · 0.45
setNamesMethod · 0.45
hashSetMethod · 0.45

Tested by

no test coverage detected