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

Method testWholeImage

test/IECoreImage/FontTest.py:63–76  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

61 self.assertTrue( i.channelValid( "Y" ) )
62
63 def testWholeImage( self ) :
64
65 f = IECoreImage.Font( os.path.join( "test", "IECore", "data", "fonts", "Vera.ttf" ) )
66 f.setResolution( 50 )
67
68 a = f.image( 'a' )
69 i = f.image()
70
71 self.assertEqual( (a.displayWindow.size().x + 1) * 16, i.displayWindow.size().x + 1 )
72 self.assertEqual( (a.displayWindow.size().y + 1) * 8, i.displayWindow.size().y + 1 )
73
74 self.assertTrue( len( i ), 1 )
75 self.assertTrue( "Y" in i )
76 self.assertTrue( i.channelValid( "Y" ) )
77
78if __name__ == "__main__":
79 unittest.main()

Callers

nothing calls this directly

Calls 7

setResolutionMethod · 0.95
imageMethod · 0.95
joinMethod · 0.80
channelValidMethod · 0.80
lenFunction · 0.50
FontMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected