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

Method testResetRoot

test/IECore/IndexedIO.py:203–214  ·  view source on GitHub ↗

Test FileIndexedIO resetRoot

(self)

Source from the content-addressed store, hash-verified

201 self.assertEqual( txt, IECore.Object.load( f2, "obj2" ) )
202
203 def testResetRoot(self):
204 """Test FileIndexedIO resetRoot"""
205
206 f = IECore.FileIndexedIO(os.path.join( ".", "test", "FileIndexedIO.fio" ), [], IECore.IndexedIO.OpenMode.Write)
207 g = f.subdirectory("sub1", IECore.IndexedIO.MissingBehaviour.CreateIfMissing )
208 g.subdirectory("sub2", IECore.IndexedIO.MissingBehaviour.CreateIfMissing )
209
210 e = g.entryIds()
211 self.assertEqual( len(e), 1 )
212
213 self.assertEqual( e, ["sub2"])
214 self.assertTrue( g.entry('sub2').entryType() == IECore.IndexedIO.EntryType.Directory )
215
216 def testMkdir(self):
217 """Test FileIndexedIO mkdir"""

Callers

nothing calls this directly

Calls 7

FileIndexedIOMethod · 0.80
joinMethod · 0.80
subdirectoryMethod · 0.80
entryTypeMethod · 0.80
lenFunction · 0.50
entryIdsMethod · 0.45
entryMethod · 0.45

Tested by

no test coverage detected