
    Mh6                         S SK r S SKrS SKrS SKJs  Jr  S SKr\R                  S 5       r	\R                  S 5       r
S rS rS rS rS r\R                   " S	5      S
 5       rS rg)    Nc                  N    [         R                  " S5      n [        U SS 5        U $ )Npandas_dummy_backendplotc                      g)N
used_dummy )argskwargss     T/var/www/html/env/lib/python3.13/site-packages/pandas/tests/plotting/test_backend.py<lambda>dummy_backend.<locals>.<lambda>   s        )types
ModuleTypesetattr)dbs    r   dummy_backendr      s%    			0	1BB<=Ir   c               #   v   #    [         R                  " SS5         Sv   SSS5        g! , (       d  f       g= f7f)z*Restore the plotting backend to matplotlibplotting.backend
matplotlibN)pandasoption_contextr   r   r   restore_backendr      s'      
		1<	@ 
A	@	@s   9(	9
69c                      Sn [         R                  " [        U S9   [        R                  " SS5        S S S 5        [        R
                  R                  R                  S:X  d   eg ! , (       d  f       N9= f)Nz9Could not find plotting backend 'not_an_existing_module'.matchr   not_an_existing_moduler   )pytestraises
ValueErrorr   
set_optionoptionsplottingbackendmsgs    r   test_backend_is_not_moduler'      sU    
EC	z	-,.FG 
. >>""**l::: 
.	-s   A''
A5c                    U R                  [        R                  SU5        [        R                  " SS5        [        R
                  " S5      S:X  d   e[        R                  R                  R                  S5      UL d   eg )Nr   r   )	setitemsysmodulesr   r!   
get_optionr#   _core_get_plot_backend)monkeypatchr   r   s      r   test_backend_is_correctr0   !   sl    %;]K
(*@A/04JJJJ//0FG=XXr   c                     U R                  [        R                  SU5        [        R                  " / SQ5      n[        R
                  " S5      S:X  d   eUR                  SS9S:X  d   eg )Nr            r   r   )r$   r   )r)   r*   r+   r   	DataFramer,   r   r/   r   r   dfs       r   $test_backend_can_be_set_in_plot_callr9   +   s]    %;]K			)	$B/0L@@@77172lBBBr   c                    UR                  U5        UR                  [        R                  SU5        US-  nUR	                  5         US-  R                  S5        [        R                  R                  R                  S5      UL d   e[        R                  " SS5         [        R                  R                  R                  5       UL d   e S S S 5        g ! , (       d  f       g = f)Nr   zmy_backend-0.0.0.dist-infozentry_points.txts@   [pandas_plotting_backends]
my_ep_backend = pandas_dummy_backend
my_ep_backendr   )syspath_prependr)   r*   r+   mkdirwrite_bytesr   r#   r-   r.   r   )r   tmp_pathr/   r   	dist_infos        r   test_register_entrypointrA   3   s    )%;]K77IOO ##00M ??  22?C}TTT			1?	C$$668MIII 
D	C	Cs   !.C
C'c                    [         R                  " S5      nU R                  [        R                  SU5        [
        R                  R                  R                  S:X  d   e[        R                  " [        SS9   [
        R                  " SS5        S S S 5        [
        R                  R                  R                  S:X  d   eg ! , (       d  f       N9= f)Npandas_plot_backendr   z6Could not find plotting backend 'pandas_plot_backend'.r   r   )r   r   r)   r*   r+   r   r"   r#   r$   r   r   r    r!   )r/   modules     r   (test_setting_backend_without_plot_raisesrE   E   s    34F%:FC>>""**l:::	R
 	,.CD

 >>""**l:::
 
s   ;C
Cr   c                      Sn [         R                  " [        U S9   [        R                  R
                  R                  S5        S S S 5        g ! , (       d  f       g = f)NzVmatplotlib is required for plotting when the default backend "matplotlib" is selected.r   r   )r   r   ImportErrorr   r#   r-   r.   r%   s    r   test_no_matplotlib_okrH   S   s@    	  
{#	.//= 
/	.	.s   *A
Ac                     U R                  [        R                  SU5        [        R                  " SS5        [        R
                  " S/ SQ05      nUR                  SS9  g )Nr   r   Ar2   znot a real kind)kind)r)   r*   r+   r   r!   r6   r   r7   s       r   test_extra_kinds_okrL   ]   sO    %;]K
(*@A			3	*	+BGG"G#r   )r*   r   r   pandas.util._test_decoratorsutil_test_decoratorstdr   fixturer   r   r'   r0   r9   rA   rE   skip_if_installedrH   rL   r   r   r   <module>rS      s    
   ) )     ;CJ$; l#> $>$r   