
    g!                        d dl Z d dlZd dlmZ d dlmZ ej                  j                  dd      d        Z	ej                  j                  ddg       ed	g
      ej                  j                  ddg      d                      Zd Zej                  j                  edd       e       d               Z e       d        Zy)    N)check_figures_equalTz testing that warnings fail tests)strictreasonc                  .    t        j                  d       y )NzThis should fail the test)warningswarn     Z/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/matplotlib/tests/test_testing.pytest_warn_to_failr   	   s     MM-.r
   a   png)
extensionsbc                     | |k(  sJ y Nr	   )r   fig_refr   fig_tests       r   (test_parametrize_with_check_figure_equalr      s     6M6r
   c                      t        j                  t        d      5  t               d        } d d d        y # 1 sw Y   y xY w)Nz^The decorated function)matchc                      y r   r	   )testrefs     r   should_failz&test_wrap_failure.<locals>.should_fail   s    r
   )pytestraises
ValueErrorr   )r   s    r   test_wrap_failurer       s;    	z)B	C 			 
	  s   6?z6Test for check_figures_equal test creating new figures)r   r   r   c                 ,    t        j                          y r   )pltfigure)r   r   s     r   "test_check_figures_equal_extra_figr$      s    
 JJLr
   c                 V    t        j                         }t        j                  |       y r   )r"   r#   close)r   r   figs      r   #test_check_figures_equal_closed_figr(   &   s    
**,CIIcNr
   )r   r   matplotlib.pyplotpyplotr"   matplotlib.testing.decoratorsr   markxfailr   parametrizer   r    RuntimeErrorr$   r(   r	   r
   r   <module>r0      s       = :  // qc"(qc" # ) # ,t(  )  )  r
   