#NEWLINE# def checkObj( self , name , obj , style ) : #NEWLINE# #INDENT# 'Check if the object has the style.' #NEWLINE# attrs = { #NEWLINE# #INDENT# 'TextSize' : 'text.size' , #NEWLINE# 'TextColor' : 'text.color' , #NEWLINE# 'BgColor' : 'bgColor' , #NEWLINE# 'FgColor' : 'fgColor' , #NEWLINE# #UNINDENT# } #NEWLINE# for key in attrs : #NEWLINE# #INDENT# desired = style . getValue ( ( 'figure.%s' % attrs [ key ] ) ) #NEWLINE# actual = getattr ( obj , ( 'figure%s' % key ) ) #NEWLINE# msg = ( '%s: figure %s not properly set.' % ( name , key ) ) #NEWLINE# self . assertEqual ( desired , actual , msg = msg ) #NEWLINE# desired = style . getValue ( ( 'axes.%s' % attrs [ key ] ) ) #NEWLINE# actual = getattr ( obj , ( 'axes%s' % key ) ) #NEWLINE# msg = ( '%s: axes %s not properly set.' % ( name , key ) ) #NEWLINE# self . assertEqual ( desired , actual , msg = msg )