( self )
| 125 | self.assertTrue(7022000 <= vdbObject.memoryUsage() <= 7022300, "actual memory usage: {0}".format( vdbObject.memoryUsage() )) |
| 126 | |
| 127 | def testCanRemoveGrid( self ) : |
| 128 | sourcePath = os.path.join( self.dataDir, "smoke.vdb" ) |
| 129 | |
| 130 | vdbObject = IECoreVDB.VDBObject( sourcePath ) |
| 131 | self.assertEqual(vdbObject.gridNames(), ['density']) |
| 132 | h1 = vdbObject.hash() |
| 133 | vdbObject.removeGrid('density') |
| 134 | self.assertEqual(vdbObject.gridNames(), []) |
| 135 | |
| 136 | h2 = vdbObject.hash() |
| 137 | self.assertNotEqual(h1, h2) |
| 138 | |
| 139 | emptyVDBObject = IECoreVDB.VDBObject() |
| 140 | h3 = emptyVDBObject.hash() |
| 141 | self.assertEqual(h3, h2) |
| 142 | |
| 143 | def testHashIdenticalForFileLoadedTwice( self ): |
| 144 | sourcePath = os.path.join( self.dataDir, "smoke.vdb" ) |
nothing calls this directly
no test coverage detected