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

Method testCanRemoveGrid

test/IECoreVDB/VDBObjectTest.py:127–141  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

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" )

Callers

nothing calls this directly

Calls 5

gridNamesMethod · 0.95
hashMethod · 0.95
removeGridMethod · 0.95
joinMethod · 0.80
VDBObjectMethod · 0.80

Tested by

no test coverage detected