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

Method testPathIsNative

test/IECoreScene/LinkedSceneTest.py:1179–1207  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

1177 self.assertEqual( r.readSet( "stew" ), IECore.PathMatcher(['/C/D/A/B'] ) )
1178
1179 def testPathIsNative( self ):
1180
1181 targetSceneFile = os.path.join( self.tempDir, "target.scc" )
1182
1183 w = IECoreScene.LinkedScene( targetSceneFile, IECore.IndexedIO.OpenMode.Write )
1184 A = w.createChild( "A" )
1185 B = A.createChild( "B" )
1186
1187 del B, A, w
1188
1189 r = IECoreScene.SceneCache( targetSceneFile, IECore.IndexedIO.OpenMode.Read )
1190
1191 sceneFile = os.path.join( self.tempDir, "scene.lscc" )
1192 w = IECoreScene.LinkedScene( sceneFile, IECore.IndexedIO.OpenMode.Write )
1193 C = w.createChild( "C" )
1194
1195 C.writeLink( r )
1196
1197 del w, C
1198
1199 r = IECoreScene.LinkedScene( sceneFile, IECore.IndexedIO.OpenMode.Read )
1200 C = r.child( "C" )
1201
1202 self.assertEqual(
1203 C.readAttribute( IECoreScene.LinkedScene.fileNameLinkAttribute, 0 ),
1204 IECore.StringData( targetSceneFile )
1205 )
1206
1207 self.assertEqual( C.childNames(), [ "A" ] )
1208
1209
1210 def setUp( self ) :

Callers

nothing calls this directly

Calls 9

createChildMethod · 0.95
childMethod · 0.95
joinMethod · 0.80
LinkedSceneMethod · 0.80
SceneCacheMethod · 0.80
writeLinkMethod · 0.80
createChildMethod · 0.45
readAttributeMethod · 0.45
childNamesMethod · 0.45

Tested by

no test coverage detected