ó
 m[c           @` s   d  d l  m Z m Z m Z m Z d  d l Z d  d l Z d „  Z d „  Z e j	 d e
 ƒ d „  ƒ Z e j	 d „  ƒ Z e j	 d „  ƒ Z d S(	   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNc         C` s$   t  j d ƒ t t  _ t  j ƒ  d  S(   Nu   agg(   t
   matplotlibt   uset   Truet   _called_from_pytestt   _init_tests(   t   config(    (    s:   lib/python2.7/site-packages/matplotlib/testing/conftest.pyt   pytest_configure	   s    	c         C` s   t  t _ d  S(   N(   t   FalseR   R   (   R	   (    (    s:   lib/python2.7/site-packages/matplotlib/testing/conftest.pyt   pytest_unconfigure   s    t   autousec   
      c` si  d d l  m } t j j j ƒ  } t j j ƒ  } d  } |  j j	 d ƒ } | d  k	 r’ t
 | j ƒ d k sv t d ƒ ‚ | j d } t j ƒ  } n  d } |  j j	 d ƒ } | d  k	 rç t
 | j ƒ d k s× t d ƒ ‚ | j d } n  t j j ƒ  | d  k	 rd d  l j }	 |	 j | ƒ n  t j j | ƒ z	 d  VWd  | d  k	 rW|	 j | ƒ n  | | | ƒ Xd  S(	   Ni    (   t   _do_cleanupu   backendi   u(   Marker 'backend' must specify 1 backend.u   _classic_testu   styleu$   Marker 'style' must specify 1 style.(   t   matplotlib.testing.decoratorsR   R   t   unitst   registryt   copyt   rcParamst   Nonet   keywordst   gett   lent   argst   AssertionErrort   get_backendt   testingt   setupt   matplotlib.pyplott   pyplott   switch_backendt   styleR   (
   t   requestR   t   original_units_registryt   original_settingst   backendt   backend_markert   prev_backendR    t   style_markert   plt(    (    s:   lib/python2.7/site-packages/matplotlib/testing/conftest.pyt   mpl_test_settings   s6    			c         c` sn   |  j  d j d } | d  k r2 |  j d ƒ } n  |  j } | | f | j _ z	 d  VWd  t | j d ƒ Xd  S(   Nu   baseline_imagesi    u
   parameters(   R   R   R   t   getfixturevaluet   functiont   __wrapped__t
   parameterst   delattr(   R!   t	   extensiont   baseline_imagest   func(    (    s:   lib/python2.7/site-packages/matplotlib/testing/conftest.pyt   mpl_image_comparison_parameters9   s    
		c          c` sŽ   t  j d ƒ }  y d d l m } Wn! t k
 rF d d l m } n X| ƒ  z	 |  VWd y d d l m } Wn t k
 r n X| ƒ  Xd S(   u'   Fixture to import and configure pandas.u   pandasi    (   t   register_matplotlib_converters(   t   registerN(   t    deregister_matplotlib_converters(   t   pytestt   importorskipt   pandas.plottingR3   t   ImportErrort   pandas.tseries.converterR4   R5   (   t   pdR4   t
   deregister(    (    s:   lib/python2.7/site-packages/matplotlib/testing/conftest.pyR;   Q   s    	(   t
   __future__R    R   R   R   R6   R   R
   R   t   fixtureR   R)   R2   R;   (    (    (    s:   lib/python2.7/site-packages/matplotlib/testing/conftest.pyt   <module>   s   "		&