def testBasic( self ):

      values = {
         # Artist Properties
         'alpha' : 0.95,
         'clip_on' : True,
         'snap' : True,
         'visible' : False,
         'zorder' : 5,
         # Text Properties
         'backgroundcolor' : '#FF0000',
         'color' : '#0000FF',
         'verticalalignment' : 'center',
         'horizontalalignment' : 'left',
         'multialignment' : 'right',
         'linespacing' : 2.0,
         'rotation' : 15.0,
         'fontsize' : 24.0,
         'fontstyle' : 'italic',
         'fontweight' : 700,
         'fontfamily' : ['serif'],
      }

      element = mpl.text.Text()

      #----------------------------------------------------------------------
      #MPL-HACK: There is a bug in matplotlib, where they forgot to add this
      #MPL-HACK: method to Text.  We put this here to make the test work until
      #MPL-HACK: it is updated in matplotlib.
      #FUTURE: Fix this in matplotlib.

      def get_linespacing():
         return element._linespacing

      element.get_linespacing = get_linespacing

      def get_multialignment():
         return element._multialignment

      element.get_multialignment = get_multialignment

      def get_backgroundcolor():
         if element._bbox is None:
            return None
         else:
            return element._bbox.get( 'facecolor', None )

      element.get_backgroundcolor = get_backgroundcolor
      #----------------------------------------------------------------------

      style = MplTextStyle(
         # Artist Properties
         alpha = values['alpha'],
         clip = values['clip_on'],
         snap = values['snap'],
         visible = values['visible'],
         zOrder = values['zorder'],
         # Line Properties
         bgColor = values['backgroundcolor'],
         fgColor = values['color'],
         vertAlign = values['verticalalignment'],
         horizAlign = values['horizontalalignment'],
         multiAlign = values['multialignment'],
         lineSpacing = values['linespacing'],
         rotation = values['rotation'],
         font = { 'size' : values['fontsize'],
                  'style' : values['fontstyle'],
                  'weight' : values['fontweight'],
                  'family' : values['fontfamily'][0], },
      )

      style.apply( element )

      self.checkElement( "Apply", values, element )

      self.assertRaises( Exception, style.apply, 'invalid',
                   msg = "Failed to throw on invalid element." )

   #-----------------------------------------------------------------------
Parses mapreduce.yaml file contents.
dataset/ETHPy150Open nasa/mplStyle/mplStyle/test/test_MplTextStyle.py/TestMplTextStyle.testBasic--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/mapreduce/status.py/parse_mapreduce_yaml