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

Method testPostProcessing

test/IECore/CachedReader.py:192–210  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

190 self.assertEqual( r.searchPath, IECore.SearchPath( [ "a", "test", "path" ] ) )
191
192 def testPostProcessing( self ) :
193
194 r = IECore.CachedReader( IECore.SearchPath( "./test/IECore/data/cobFiles" ), IECore.ObjectPool(100 * 1024 * 1024) )
195 i = r.read( "intDataTen.cob" )
196 self.assertEqual( i.value, 10 )
197
198 class PostProcessor( IECore.ModifyOp ) :
199
200 def __init__( self ) :
201
202 IECore.ModifyOp.__init__( self, "", IECore.IntParameter( "result", "" ), IECore.IntParameter( "input", "" ) )
203
204 def modify( self, obj, args ) :
205
206 obj.value *= 2
207
208 r = IECore.CachedReader( IECore.SearchPath( "./test/IECore/data/cobFiles" ), PostProcessor(), IECore.ObjectPool(100 * 1024 * 1024) )
209 i = r.read( "intDataTen.cob" )
210 self.assertEqual( i.value, 20 )
211
212 def testPostProcessingFailureMode( self ) :
213

Callers

nothing calls this directly

Calls 5

readMethod · 0.95
PostProcessorClass · 0.85
CachedReaderMethod · 0.80
SearchPathMethod · 0.80
ObjectPoolMethod · 0.80

Tested by

no test coverage detected