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

Method testMissingScene

test/IECoreScene/SceneCacheTest.py:243–259  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

241 self.assertEqual( None, m.child( "b", IECoreScene.SceneInterface.MissingBehaviour.NullIfMissing ) )
242
243 def testMissingScene( self ) :
244
245 m = IECoreScene.SceneCache( os.path.join( self.tempDir, "test.scc" ), IECore.IndexedIO.OpenMode.Write )
246 a = m.createChild( "a" )
247 b = a.createChild( "b" )
248 c = b.createChild( "c" )
249 del m, a, b, c
250
251 m = IECoreScene.SceneCache( os.path.join( self.tempDir, "test.scc" ), IECore.IndexedIO.OpenMode.Read )
252 a = m.scene( [ "a" ] )
253 b = m.scene( [ "a", "b" ] )
254 self.assertEqual( b.path(), a.child( "b" ).path() )
255 c = m.scene( [ "a", "b", "c" ] )
256 self.assertEqual( c.path(), b.child( "c" ).path() )
257
258 self.assertRaises( RuntimeError, m.scene, [ "a", "d" ] )
259 self.assertEqual( None, m.scene( [ "a", "d" ], IECoreScene.SceneInterface.MissingBehaviour.NullIfMissing ) )
260
261 def testExplicitBoundDilatesImplicitBound( self ) :
262

Callers

nothing calls this directly

Calls 6

createChildMethod · 0.95
sceneMethod · 0.95
SceneCacheMethod · 0.80
joinMethod · 0.80
pathMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected