
    ^j^                    .   d dl mZ d dlmZ d dlZd dlZd dlmZmZ d dlZ	d dl
Z
d dlZd dlmZ ej                  rd dlmZ  ed      Zd Ze
j$                  j'                  d	g d
      	 	 	 	 	 	 dd       ZddZd ZddZddZddZddZddZddZy)    )annotations)CallableN)AnyTypeVar)_api)SelfTc                 d    G d d      }  G d d|       } |       }t        j                  t        j                  d      5  |j	                          d d d        t        j                  t        j                  d      5  |j                          d d d        y # 1 sw Y   HxY w# 1 sw Y   y xY w)Nc                      e Zd Zd Zd Zy)%test_unsupported_method.<locals>.Basec                     y N selfs    d/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/matplotlib/tests/test_api.pymethod_1z.test_unsupported_method.<locals>.Base.method_1           c                     y r   r   r   s    r   method_2z.test_unsupported_method.<locals>.Base.method_2   r   r   N)__name__
__module____qualname__r   r   r   r   r   Baser      s    		r   r   c                  T    e Zd Z ej                         Z ej                  d      Zy)&test_unsupported_method.<locals>.ChildzSorry!)append_messageN)r   r   r   r   unsupported_methodr   r   r   r   r   Childr      s$    *4**,*4**(Cr   r    z%^Child does not support 'method_1'\.$matchz,^Child does not support 'method_2'\. Sorry!$)pytestraisesr   UnsupportedErrorr   r   )r   r    childs      r   test_unsupported_methodr'      s     D D GE	t,,E
G  
t,,L
N    s   B B&B#&B/ztarget,shape_repr,test_shape))r   z(N,))      )Nr)   (N, 3))r(   )r*   r+   )r(      ))r(      z(1, 5))r(   	   ))Nr,   Nz	(M, 2, N))r(   r)   r(   c           	        dt        j                  dt        |        d| d|       z   }t        j                  |      }t        j                  t        |      5  t        j                  | |       d d d        y # 1 sw Y   y xY w)N^z'aardvark' must be zD with shape z, but your input has shape r!   )aardvark)
reescapelennpzerosr#   r$   
ValueErrorr   check_shape)target
shape_repr
test_shapeerror_patterndatas        r   test_check_shaper>   *   s}     "))
c&k]-
| DL	"# #M 88JD	z	7 0$/0 0 0s   A<<Bc                 6    G d d      } t        j                  t        j                        5  | j                   d d d        t        j                  t        j                        5   |        }|j                   d d d        y # 1 sw Y   IxY w# 1 sw Y   y xY w)Nc                  \    e Zd Z ej                  d      ej
                  dd              Zy))test_classproperty_deprecation.<locals>.Az0.0.0c                     y r   r   )clss    r   fz+test_classproperty_deprecation.<locals>.A.f>   s     r   N)rC   r   returnNone)r   r   r   r   
deprecatedclasspropertyrD   r   r   r   ArA   =   s-    		!				 
 
"	r   rI   )r#   warnsmplMatplotlibDeprecationWarningrD   )rI   as     r   test_classproperty_deprecationrN   <   sv     
 
c66	7 		c66	7 C	   s   B&BBBc            
        t        j                  t        j                  d      5  t	        j
                  dd       d d d        t        j                  t        j                  d      5  t	        j
                  ddd       d d d        t        j                  t        j                  d	      5  t	        j
                  ddd
       d d d        t        j                  t        j                  d      5  t	        j
                  ddd       d d d        t        j                  t        j                  d      5  t	        j
                  ddd       d d d        t        j                  t        j                  d      5  t	        j
                  ddd       d d d        t        j                  t        d      5  t	        j
                  ddd       d d d        t        j                  t        d      5  t	        j
                  dddd       d d d        t        j                  t        j                  d      5  t	        j
                  dddd
ddd       d d d        y # 1 sw Y   ,xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   HxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)NzEfoo was deprecated in Matplotlib 3\.10 and will be removed in 3\.12\.r!   z3.10foo)namezOThe foo class was deprecated in Matplotlib 3\.10 and will be removed in 3\.12\.class)rQ   obj_typezWfoo was deprecated in Matplotlib 3\.10 and will be removed in 3\.12\. Use bar instead\.bar)rQ   alternativezXfoo was deprecated in Matplotlib 3\.10 and will be removed in 3\.12\. More information\.zMore information.)rQ   addendumzDfoo was deprecated in Matplotlib 3\.10 and will be removed in 4\.0\.z4.0)rQ   removalz(foo was deprecated in Matplotlib 3\.10\.Fz*foo will be deprecated in a future versionT)rQ   pendingzcannot have a scheduled removalz3.12)rQ   rX   rW   zComplete replacement)messagerQ   rU   rV   rS   rW   )	r#   rJ   rK   rL   r   warn_deprecatedPendingDeprecationWarningr$   r7   r   r   r   test_warn_deprecatedr\   I   su   	c662
3 1 	V%01 
c66:
; C 	V%'BC 
c66D
E D 	V%UCD 
c66E
F O 	V%:MNO 
c661
2 @ 	V%?@ 
c66G
I @V%?@ 
/I
K ?V%>? 
z)K	L OV%vNO	c66>U	V >V-C%).9L&-u	>> >91 1C CD DO O@ @@ @? ?O O> >sk   I(+I51J7J=JJ)?J6;KK(I25I?JJJ&)J36J?KKc                 j    G d d      }  |        }t        j                  t        j                        5  |j                  dk(  sJ 	 d d d        t        j                  t        j                        5  d|_        d d d        t        j                  t        j                        5  |j                  dk(  sJ 	 d d d        t        j                  t        j                        5  |j                  d      dk(  sJ 	 d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   exY w# 1 sw Y   y xY w)Nc                  z    e Zd ZU d	dZd
dZ ej                  d      Zded<    ej                  d      Z	ded<   y)-test_deprecate_privatize_attribute.<locals>.Cc                    d| _         y )Nr(   )_attrr   s    r   __init__z6test_deprecate_privatize_attribute.<locals>.C.__init__n   s    DJr   c                    |S r   r   )r   args     r   _methz3test_deprecate_privatize_attribute.<locals>.C._metho   s    Sjr   z0.0intattrr   methNrE   rF   )rd   r	   rE   r	   )
r   r   r   rb   re   r   deprecate_privatize_attributerg   __annotations__rh   r   r   r   Cr_   m   s6    206D66u=c=;;;EBhBr   rl   r(   r,   *   )r#   rJ   rK   rL   rg   rh   )rl   cs     r   "test_deprecate_privatize_attributero   l   s    C C 	
A	c66	7 vv{{	c66	7 	c66	7 vv{{	c66	7  vvbzR         s/   D3D&D$D)DDD&)D2c                    t        j                  dd      dd	d       t        j                  dd      d
d       } | fD ]>  } |        t        j                  t        j
                        5   |d       d d d        @ t         j                  j                  fd	fd} |        t        j                  t        j
                        5   d       d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)N3.0rP   c                     y r   r   rP   s    r   func1z$test_delete_parameter.<locals>.func1       r   c                      y r   r   )kwargss    r   func2z$test_delete_parameter.<locals>.func2   ru   r   rT   rs   c                     |        y r   r   )rP   rt   s    r   pyplot_wrapperz-test_delete_parameter.<locals>.pyplot_wrapper   s
    c
r   r   )rP   r   rE   rF   )rw   r   rE   rF   )r   delete_parameterr#   rJ   rK   rL   deprecation_deprecated_parameter)rx   funcrz   rt   s      @r   test_delete_parameterr   ~   s    	5%( ) 
5%( )  \\#::; 	UO	 	
 #'"2"2"H"H  	c66	7  	 	 s   .
C
C+C(	+C4c                 Z   t        j                  dd      dd	d       }  | dd       t        j                  t        j
                        5   | dd       d d d        t        j                  t        j
                        5   | ddd       d d d        y # 1 sw Y   @xY w# 1 sw Y   y xY w)
Nrq   rd   c                     y r   r   )prerd   posts      r   r~   z$test_make_keyword_only.<locals>.func   ru   r   r(   r,   )rd   r)   r   )r   r   rd   r   r   r   rE   rF   )r   make_keyword_onlyr#   rJ   rK   rL   )r~   s    r   test_make_keyword_onlyr      s    	E5) * 	N	c66	7 Q
	c66	7 Q1   s   
BB!B!B*c                     d} t        j                  d|       dd       }|j                  t        j                  d       | |j                  v sJ y )Nz)`.f1`, `f2`, `f3(x) <.f3>` or `f4(x)<f4>`1)rU   c                      y r   r   r   r   r   rD   z'test_deprecation_alternative.<locals>.f   ru   r   zDocumentation is disabledri   )r   rG   __doc__r#   skip)rU   rD   s     r   test_deprecation_alternativer      sM    =K	__Sk2 3yy/0!))###r   c                     t        j                  t        d      5  t        j                  dg       d d d        y # 1 sw Y   y xY w)NzNo argument to check!r!   rM   )r#   r$   	TypeErrorr   check_in_listr   r   r   test_empty_check_in_listr      s6    	y(?	@ "C5!" " "s	   <Ac                     t        j                  t        d      5  t        j                  ddgt        j                  d             d d d        y # 1 sw Y   y xY w)Nzarray\(5\) is not a valid valuer!   rM   br-   )value)r#   r$   r7   r   r   r5   arrayr   r   r   test_check_in_list_numpyr      sB    	z)K	L :C:RXXa[9: : :s   -AA)r9   ztuple[int | None, ...]r:   strr;   ztuple[int, ...]rE   rF   ri   )
__future__r   collections.abcr   r2   typingr   r   numpyr5   r#   
matplotlibrK   r   TYPE_CHECKINGr   r	   r'   markparametrizer>   rN   r\   ro   r   r   r   r   r   r   r   r   <module>r      s    " $ 	       
CL* 70!$0!005900
 >F $,
$"
:r   