U
    Âmœd!  ã                   @   s®   d dl Z d dlZd dlmZ d dlmZ ejjddd�dd„ ƒZ	ej 
dd	g¡ed
gd�ej 
dd	g¡dd„ ƒƒƒZdd„ Zejjeddd�eƒ dd„ ƒƒZeƒ dd„ ƒZdS )é    N)Úcheck_figures_equalTz testing that warnings fail tests)ÚstrictÚreasonc                   C   s   t  d¡ d S )NzThis should fail the test)ÚwarningsÚwarn© r   r   úV/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/matplotlib/tests/test_testing.pyÚtest_warn_to_fail	   s    r	   Úaé   Zpng)Ú
extensionsÚbc                 C   s   | |kst ‚d S ©N)ÚAssertionError)r
   Úfig_refr   Úfig_testr   r   r   Ú(test_parametrize_with_check_figure_equal   s    r   c               	   C   s,   t jtdd�� tƒ dd„ ƒ} W 5 Q R X d S )Nz^The decorated function)Úmatchc                 S   s   d S r   r   )ÚtestÚrefr   r   r   Úshould_fail   s    z&test_wrap_failure.<locals>.should_fail)ÚpytestÚraisesÚ
ValueErrorr   )r   r   r   r   Útest_wrap_failure   s    r   z6Test for check_figures_equal test creating new figures)r   r   r   c                 C   s   t  ¡  d S r   )ÚpltÚfigure)r   r   r   r   r   Ú"test_check_figures_equal_extra_fig   s    r   c                 C   s   t  ¡ }t  |¡ d S r   )r   r   Úclose)r   r   Zfigr   r   r   Ú#test_check_figures_equal_closed_fig&   s    r   )r   r   Zmatplotlib.pyplotZpyplotr   Zmatplotlib.testing.decoratorsr   ÚmarkZxfailr	   Zparametrizer   r   ÚRuntimeErrorr   r   r   r   r   r   Ú<module>   s(    ÿ


ÿ