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

Method testDataWindow

test/IECoreGL/TextureLoaderTest.py:86–98  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

84 self.assertLessEqual( max( size.x, size.y ), int( 0.5 * maxResolution ) )
85
86 def testDataWindow( self ) :
87
88 l = IECoreGL.TextureLoader( IECore.SearchPath( "." + os.path.sep ) )
89
90 self.assertEqual(
91 l.load( os.path.join( "test", "IECoreImage", "data", "exr", "imageCropDataWindow.exr" ) ).imagePrimitive(),
92 l.load( os.path.join( "test", "IECoreImage", "data", "exr", "imageCropDataWindowMatched.exr" ) ).imagePrimitive()
93 )
94
95 self.assertEqual(
96 l.load( os.path.join( "test", "IECoreImage", "data", "exr", "oversizeDataWindow.exr" ) ).imagePrimitive().dataWindow,
97 imath.Box2i( imath.V2i(0,0), imath.V2i(255,255) )
98 )
99
100if __name__ == "__main__":
101 unittest.main()

Callers

nothing calls this directly

Calls 5

loadMethod · 0.95
TextureLoaderMethod · 0.80
SearchPathMethod · 0.80
joinMethod · 0.80
imagePrimitiveMethod · 0.45

Tested by

no test coverage detected