3
$ßL]ª  ã               @   s^   d Z ddlZddlZddlZddlZddlmZ ejeƒZ	dd„ Z
dd„ Zdd	„ Zd
d„ ZdS )z
Helper functions for testing.
é    N)Úcbookc               C   s   t tddƒS )zWhether we are in a pytest run.Z_called_from_pytestF)ÚgetattrÚmpl© r   r   úC/tmp/pip-install-edjban26/matplotlib/matplotlib/testing/__init__.pyÚis_called_from_pytest   s    r   c               C   s"   dt jd< dt jd< dt jd< d S )NzDejaVu Sanszfont.familyFztext.hintingé   ztext.hinting_factor)r   ÚrcParamsr   r   r   r   Úset_font_settings_for_testing   s    

r
   c               C   s   dt jd< d S )NÚ
matplotlibzsvg.hashsalt)r   r	   r   r   r   r   Úset_reproducibility_for_testing   s    r   c               C   sš   yt jt jdƒ W nJ t jk
r\   yt jt jdƒ W n  t jk
rV   tjdƒ Y nX Y nX tjdddd� tj	ƒ � tj
ƒ  W d Q R X tƒ  tƒ  d S )Nzen_US.UTF-8zEnglish_United States.1252zPCould not set locale to English/United States. Some date-related tests may fail.ZAggTF)ÚforceÚwarn)ÚlocaleÚ	setlocaleÚLC_ALLÚErrorÚ_logÚwarningr   Zuser   Z(_suppress_matplotlib_deprecation_warningZ
rcdefaultsr
   r   r   r   r   r   Úsetup   s    
r   )Ú__doc__r   ÚloggingÚwarningsr   r   r   Ú	getLoggerÚ__name__r   r   r
   r   r   r   r   r   r   Ú<module>   s   
