ó
 m[c           @` s   d  d l  m Z m Z m Z m Z d  d l Z d  d l Z d  d l Z d  d l Z	 d  d l m
 Z
 d   Z d   Z d   Z d   Z d   Z d S(	   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsN(   t   cbookc           C` s   t  t d t  S(   u-   Returns whether the call was done from pytestu   _called_from_pytest(   t   getattrt   mplt   False(    (    (    s:   lib/python2.7/site-packages/matplotlib/testing/__init__.pyt   is_called_from_pytest   s    c         C` s   t  j | |   |  | _ | S(   u=   Replicates metadata of the function. Returns target function.(   t	   functoolst   update_wrappert   __wrapped__(   t   src_funct   tgt_func(    (    s:   lib/python2.7/site-packages/matplotlib/testing/__init__.pyt   _copy_metadata   s    	c           C` s+   d t  j d <t t  j d <d t  j d <d  S(   Nu   DejaVu Sansu   font.familyu   text.hintingi   u   text.hinting_factor(   R   t   rcParamsR   (    (    (    s:   lib/python2.7/site-packages/matplotlib/testing/__init__.pyt   set_font_settings_for_testing   s    c           C` s   d t  j d <d  S(   Nu
   matplotlibu   svg.hashsalt(   R   R   (    (    (    s:   lib/python2.7/site-packages/matplotlib/testing/__init__.pyt   set_reproducibility_for_testing   s    c          C` sĖ   d d  l  }  d d l m } m } m } y |  j |  j t d   WnU |  j k
 r y |  j |  j t d   Wq |  j k
 r t	 j
 d  q Xn Xt j d d t t j   t   t   d  S(   Ni    (   t   backend_aggt   backend_pdft   backend_svgu   en_US.UTF-8u   English_United States.1252uO   Could not set locale to English/United States. Some date-related tests may failu   Aggt   warn(   t   localet   matplotlib.backendsR   R   R   t	   setlocalet   LC_ALLt   strt   Errort   warningsR   R   t   useR   t
   rcdefaultsR   R   (   R   R   R   R   (    (    s:   lib/python2.7/site-packages/matplotlib/testing/__init__.pyt   setup#   s    
(   t
   __future__R    R   R   R   t   sixR	   R   t
   matplotlibR   R   R   R   R   R   R   (    (    (    s:   lib/python2.7/site-packages/matplotlib/testing/__init__.pyt   <module>   s   "				