
    (ph                         S SK r S SKrS SKrS SKJr  S rS r\ R                  " SS9S 5       r\ R                  S 5       r\ R                  S	 5       r	\ R                  S
 5       r
g)    N)_apic                     S H  u  pU R                  X5        M     [        R                  " SSS9  S[        l        [        R                  " 5         g )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      N/var/www/html/venv/lib/python3.13/site-packages/matplotlib/testing/conftest.pypytest_configurer      sD    

 	+ NN5%%)J"    c                     S[         l        g )NF)r   r   )r   s    r   pytest_unconfigurer       s
    %*J"r   T)autousec           
   #   j  #    SSK Jn  U" 5          S nU R                  R                  S5      n[        R
                  " 5       nUb  [        UR                  5      S:X  d   S5       eUR                  u  nUR                  R                  SS5      nUR                  5       R                  S5      (       a-  [        S	 S
 5       5      (       a  [        R                  " S5        [        R                  R!                  5         ["        R$                  " 5          Ub  SS KJn   UR+                  U5        [        R.                  R1                  SS/5        S S S 5         S v   Ub'  WR3                  S5        [        R0                  " U5        S S S 5        g ! [,         aC  nSUR                  5       ;   d  W(       a"  [        R                  " SU SU S35         S nANe S nAff = f! , (       d  f       N= f! Ub(  WR3                  S5        [        R0                  " U5        f f = f! , (       d  f       g = f7f)Nr   )_cleanup_cmbackend   z(Marker 'backend' must specify 1 backend.skip_on_importerrorFqt5c              3   `   #    U  H$  n[         R                  R                  U5      v   M&     g 7f)N)sysmodulesget).0ks     r   	<genexpr>$mpl_test_settings.<locals>.<genexpr>6   s"     G3Fas{{q))3Fs   ,.)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_settingsrF   $   s    9	 88C!--/%~**+q0 ;:;0%**HG"0"7"7";";%u#. }}))%00G3FGGGKK >?  "99;" 0	&&w/   )-B!CD! <"	-"		% |,Q 
2 #  '--/15H$B'.ir#b%: ; ;  <;( "		% |, #M 
s}   H3DH"
G!F0!G!H"G2*H"	H3
G8GG!GGG!!
G/	+H"2-HH""
H0,H3c                  p    [         R                  " S5      n  SSKJn  U" 5         U $ ! [         a     U $ f = f)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)r6   importorskippandas.plottingrI   r>   )pd
deregisters     r   rL   rL   S   sC      
		X	&B	< I  Is   ' 
55c                  2    [         R                  " S5      n U $ )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)r6   rJ   )xrs    r   rP   rP   m   s    " 
		X	&BIr   c                 l   ^ SSK Jm  S nU4S jnU R                  SU5        U R                  SU5        g)a0  
Replace texts with placeholder rectangles.

The rectangle size only depends on the font size and the number of characters. It is
thus insensitive to font properties and rendering details. This should be used for
tests that depend on text geometries but not the actual text rendering, e.g. layout
tests.
r   )	Rectanglec                 P    UR                  5       n[        U5      U-  S-  nSnXeU4$ )z
Replace ``_get_text_metrics_with_cache`` with fixed results.

The usual ``renderer.get_text_width_height_descent`` would depend on font
metrics; instead the fixed results are based on font size and the length of the
string only.
gS?r   )get_sizer0   )renderertextfontpropismathdpiheightwidthdescents           r   #patched_get_text_metrics_with_cache>text_placeholders.<locals>.patched_get_text_metrics_with_cache   s5     ""$D	F"U*g%%r   c                   > Ub  Xl         U R                  5       (       d  gU R                  5       S:X  a  gU R                  5       nT" UR                  UR
                  UR                  U R                  5       SS9nUR                  U5        g)z
Replace ``Text.draw`` with a fixed bounding box Rectangle.

The bounding box corresponds to ``Text.get_window_extent``, which ultimately
depends on the above patched ``_get_text_metrics_with_cache``.
N none)	facecolor	edgecolor)		_rendererget_visibleget_textget_window_extentp0r[   rZ   	get_colordraw)selfrU   bboxrectrR   s       r   patched_text_draw,text_placeholders.<locals>.patched_text_draw   sv     %N!!==?b %%'$**dkk#'>>#3vG		(r   z,matplotlib.text._get_text_metrics_with_cachezmatplotlib.text.Text.drawN)matplotlib.patchesrR   setattr)monkeypatchr]   rn   rR   s      @r   text_placeholdersrs      s:     -& $ F;=35FGr   )r6   r   r   r   r   r   fixturerF   rL   rP   rs    r   r   <module>rv      s     
  2+ +- +-\  2  ( /H /Hr   