def checkObj( self, name, obj, style ):
      attrs = {
         'TextSize' : 'text.size',
         'TextColor' : 'text.color',
         'BgColor' : 'bgColor',
         'FgColor' : 'fgColor'
      }

      style = style.resolve(None)

      for key in attrs:
         desired = style.getValue( 'figure.%s' % attrs[key] )
         actual = getattr( obj, 'figure%s' % key )
         msg = "%s: figure %s not properly set." % (name, key)
         self.assertEqual( desired, actual, msg = msg )

         desired = style.getValue( 'axes.%s' % attrs[key] )
         actual = getattr( obj, 'axes%s' % key )
         msg = "%s: axes %s not properly set." % (name, key)
         self.assertEqual( desired, actual, msg = msg )

   #-----------------------------------------------------------------------
Check if the object has the style.
dataset/ETHPy150Open nasa/mplStyle/mplStyle/types/test/test_StyleManager.py/TestStyleManager.checkObj