( self )
| 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 |
nothing calls this directly
no test coverage detected