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

Method testConstructors

test/IECore/IndexedIO.py:168–180  ·  view source on GitHub ↗

Test FileIndexedIO constuctors

(self)

Source from the content-addressed store, hash-verified

166 ']', '=', '`' ]
167
168 def testConstructors(self):
169 """Test FileIndexedIO constuctors"""
170 f = IECore.FileIndexedIO(os.path.join( ".", "test", "FileIndexedIO.fio" ), [], IECore.IndexedIO.OpenMode.Write)
171 self.assertEqual( f.fileName() , os.path.join( ".", "test", "FileIndexedIO.fio" ) )
172 self.assertEqual( f.path() , [] )
173 self.assertEqual( f.currentEntryId() , "/" )
174
175 self.assertRaises( RuntimeError, IECore.FileIndexedIO, os.path.join( ".", "test", "FileIndexedIO.fio" ), ["nonexistantentrypoint"], IECore.IndexedIO.OpenMode.Read)
176 f = None
177 f = IECore.FileIndexedIO(os.path.join( ".", "test", "FileIndexedIO.fio" ), [], IECore.IndexedIO.OpenMode.Read)
178 self.assertEqual( f.path() , [] )
179 f = IECore.FileIndexedIO(os.path.join( ".", "test", "FileIndexedIO.fio" ), IECore.IndexedIO.OpenMode.Read)
180 self.assertEqual( f.path() , [] )
181
182 def testEmptyWrite(self):
183 """Test FileIndexedIO empty file writing"""

Callers

nothing calls this directly

Calls 5

FileIndexedIOMethod · 0.80
joinMethod · 0.80
currentEntryIdMethod · 0.80
fileNameMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected