Test FileIndexedIO rm
(self)
| 307 | self.assertTrue( f.entry(e[0]).entryType() == IECore.IndexedIO.EntryType.Directory) |
| 308 | |
| 309 | def testRm(self): |
| 310 | """Test FileIndexedIO rm""" |
| 311 | |
| 312 | f = IECore.FileIndexedIO(os.path.join( ".", "test", "FileIndexedIO.fio" ), [], IECore.IndexedIO.OpenMode.Write) |
| 313 | g = f.subdirectory("sub2", IECore.IndexedIO.MissingBehaviour.CreateIfMissing ) |
| 314 | |
| 315 | g.subdirectory("sub2.1", IECore.IndexedIO.MissingBehaviour.CreateIfMissing ) |
| 316 | g.subdirectory("sub2.2", IECore.IndexedIO.MissingBehaviour.CreateIfMissing ) |
| 317 | g.subdirectory("sub2.3", IECore.IndexedIO.MissingBehaviour.CreateIfMissing ) |
| 318 | |
| 319 | e = g.entryIds() |
| 320 | self.assertEqual( len(e), 3 ) |
| 321 | g.remove("sub2.1") |
| 322 | e = g.entryIds() |
| 323 | self.assertEqual( len(e), 2 ) |
| 324 | f.subdirectory('sub2').remove("sub2.2") |
| 325 | e = g.entryIds() |
| 326 | self.assertEqual( len(e), 1 ) |
| 327 | g.remove("sub2.3") |
| 328 | e = g.entryIds() |
| 329 | self.assertEqual( len(e), 0 ) |
| 330 | f.remove("sub2") |
| 331 | |
| 332 | @unittest.skipUnless( os.environ.get("CORTEX_PERFORMANCE_TEST", False), "'CORTEX_PERFORMANCE_TEST' env var not set" ) |
| 333 | def testRmStress(self) : |
nothing calls this directly
no test coverage detected