
    P/Ph                         d dl Z d dlZd dlZd dlmZ d Zd Z e j        d          d             Ze j        d             Ze j        d	             Z	dS )
    N)_apic                     dD ]\  }}|                      ||           t          j        dd           dt          _        t          j                     d S )N))markersz*flaky: (Provided by pytest-rerunfailures.))r   z&timeout: (Provided by pytest-timeout.))r   z6backend: Set alternate Matplotlib backend temporarily.)r   z3baseline_images: Compare output against references.)r   z.pytz: Tests that require pytz to be installed.)filterwarningserror)r   z?ignore:.*The py23 module has been deprecated:DeprecationWarning)r   z]ignore:DynamicImporter.find_spec\(\) not found; falling back to find_module\(\):ImportWarningaggT)force)addinivalue_line
matplotlibuse_called_from_pytest_init_tests)configkeyvalues      [/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/matplotlib/testing/conftest.pypytest_configurer      sd    
 , ,
U 	U++++N5%%%%%)J"    c                     dt           _        d S )NF)r   r   )r   s    r   pytest_unconfigurer       s    %*J"""r   T)autousec           
   #   `  K   ddl m}  |            5  d }| j                            d          }t	          j                    }|t          |j                  dk    s
J d            |j        \  }|j        	                    dd          }|
                                                    d          r-t          d	 d
D                       rt          j        d           t          j                                         t#          j                    5  |idd lm} 	 |                    |           nL# t,          $ r?}d|
                                v s|rt          j        d| d| d           n Y d }~nd }~ww xY wt          j                            ddg           d d d            n# 1 swxY w Y   	 d V  |)|                    d           t	          j        |           n1# |*|                    d           t	          j        |           w w xY wd d d            d S # 1 swxY w Y   d S )Nr   )_cleanup_cmbackend   z(Marker 'backend' must specify 1 backend.skip_on_importerrorFqt5c              3   T   K   | ]#}t           j                            |          V  $d S )N)sysmodulesget).0ks     r   	<genexpr>z$mpl_test_settings.<locals>.<genexpr>6   s0      GGas{q))GGGGGGr   )PyQt4PySidezQt4 binding already importedcairozFailed to switch to backend z (z).classic_classic_test_patchall)matplotlib.testing.decoratorsr   nodeget_closest_markerr   get_backendlenargskwargsr!   lower
startswithanypytestskiptestingsetupr   'suppress_matplotlib_deprecation_warningmatplotlib.pyplotpyplotswitch_backendImportErrorstyler   close)requestr   r   backend_markerprev_backendr   pltexcs           r   mpl_test_settingsrE   $   s:     999999	 (- (- 88CC!-//%~*++q000: 100%*HG"0"7";";%u#. #. }}))%00 @GG3FGGGGG @K >???  """9;; 	E 	E" 0/////	&&w////"    '--//115H1 %:'.%: %:25%: %: %: ; ; ; ; ; ; ; ; ;	   )-B!CDDD!	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E 	E"	-EEE"		%   |,,, "		%   |,,,, #M(- (- (- (- (- (- (- (- (- (- (- (- (- (- (- (- (- (-sx   C=H#	F)D0/F)0
E9:5E4/F)4E99$F)H#)F-	-H#0F-	1H#5G%9,H#%.HH##H'*H'c                  r    t          j        d          } 	 ddlm}  |             n# t          $ r Y nw xY w| S )a  
    Fixture to import and configure pandas. Using this fixture, the test is skipped when
    pandas is not installed. Use this fixture instead of importing pandas in test files.

    Examples
    --------
    Request the pandas fixture by passing in ``pd`` as an argument to the test ::

        def test_matshow_pandas(pd):

            df = pd.DataFrame({'x':[1,2,3], 'y':[4,5,6]})
            im = plt.figure().subplots().matshow(df)
            np.testing.assert_array_equal(im.get_array(), df)
    pandasr   ) deregister_matplotlib_converters)r5   importorskippandas.plottingrH   r=   )pd
deregisters     r   rK   rK   S   si      
	X	&	&B	< 	< 	< 	< 	< 	<
   Is   ' 
44c                  .    t          j        d          } | S )a  
    Fixture to import xarray so that the test is skipped when xarray is not installed.
    Use this fixture instead of importing xrray in test files.

    Examples
    --------
    Request the xarray fixture by passing in ``xr`` as an argument to the test ::

        def test_imshow_xarray(xr):

            ds = xr.DataArray(np.random.randn(2, 3))
            im = plt.figure().subplots().imshow(ds)
            np.testing.assert_array_equal(im.get_array(), ds)
    xarray)r5   rI   )xrs    r   rO   rO   m   s    " 
	X	&	&BIr   )
r5   r   r   r   r   r   fixturerE   rK   rO    r   r   <module>rR      s     



            2+ + + +- +- +-\   2     r   