o
    :a!                     @   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   ?/usr/lib/python3/dist-packages/matplotlib/tests/test_testing.pytest_warn_to_fail	   s   r	   a   Zpng)
extensionsbc                 C   s   | |ksJ d S Nr   )r
   fig_refr   fig_testr   r   r   (test_parametrize_with_check_figure_equal   s   r   c                  C   sB   t jtdd t dd } W d    d S 1 sw   Y  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   ZmarkZxfailr	   Zparametrizer   r   RuntimeErrorr   r   r   r   r   r   <module>   s(    


