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

Method testWriteIncomplete

test/IECoreImage/ImageWriterTest.py:244–266  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

242 self.tearDown()
243
244 def testWriteIncomplete( self ) :
245
246 displayWindow = imath.Box2i(
247 imath.V2i( 0, 0 ),
248 imath.V2i( 99, 99 )
249 )
250
251 dataWindow = displayWindow
252
253 imgOrig = self.__makeFloatImage( dataWindow, displayWindow )
254
255 # We don't have enough data to fill this dataWindow
256 imgOrig.dataWindow = imath.Box2i(
257 imath.V2i( 0, 0 ),
258 imath.V2i( 199, 199 )
259 )
260
261 self.assertFalse( imgOrig.channelsValid() )
262
263 def fn():
264 w = IECore.Writer.create( imgOrig, os.path.join( "test", "IECoreImage", "data", "exr", "output.exr" ) )
265
266 self.assertRaises( RuntimeError, fn )
267
268
269 def testWindowWrite( self ) :

Callers

nothing calls this directly

Calls 2

__makeFloatImageMethod · 0.95
channelsValidMethod · 0.80

Tested by

no test coverage detected