+
    ,ic,                     *   ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ]! RR.RR7      RR	 l4       t].tR
.tR t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       t]P"                  P%                  R]]R7      R 4       tR tR tR tR tR t ! R R4      tR# )    N_preprocess_data)Axes)subprocess_run_for_testing)check_figures_equalxyreplace_nameslabel_namerc           
      H    R \        V4       R\        V4       RV RV RV 2
# zx: z, y: z, ls: z, w: z	, label: listaxr   r	   lslabelws   &&&&&&G/usr/lib/python3/dist-packages/matplotlib/tests/test_preprocess_data.py	plot_funcr      s/    a	tAwivbTqc5'JJ    r   c                    R p R pR pR p\        RR.R7      ! V 4       \        RR.R7      ! V4       \        RR.R7      ! V4       \        P                  ! \        4      ;_uu_ 4        \        . ROR7      ! V4       R	R	R	4       \        . R	R
7      ! V 4       \        . R	R
7      ! V4       \        . R	R
7      ! V4       \        . R	R
7      ! V4       \        P                  ! \        4      ;_uu_ 4        \        RR7      ! V 4       R	R	R	4       \        P                  ! \        4      ;_uu_ 4        \        RR7      ! V4       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     Lb; i  + '       g   i     R	# ; i)z.Test decorator invocations -> no replacements.c                     R # N )r   r   r	   s   &&&r   func%test_compiletime_checks.<locals>.func   s    r   c                     R # r   r   )r   r   r	   argss   &&&*r   	func_args*test_compiletime_checks.<locals>.func_args    s    Dr   c                     R # r   r   )r   r   r	   kwargss   &&&,r   func_kwargs,test_compiletime_checks.<locals>.func_kwargs!   s    r   c                      R # r   r   )r    r$   s   *,r   func_no_ax_args0test_compiletime_checks.<locals>.func_no_ax_args"   s    $r   r   r	   r   zNr
   r   )r   r	   r+   )r   pytestraisesAssertionError)r   r!   r%   r(   s       r   test_compiletime_checksr0      s    (-. C:.t4C:.{;C:.y9 
~	&	&7	B 
'
 248>248C248E248I 
~	&	&S)$/ 
' 
~	&	&S))4 
'	& 
'	& 
'	& 
'	&	&s$   +E6E#3E6E 	#E3	6F	r   )idsc                    V ! RRR4      R8X  g   Q hV ! RRRR7      R8X  g   Q hV ! RRRRR7      R8X  g   Q hV ! RRRR	R7      R
8X  g   Q hV ! RRRRR7      R8X  g   Q hV ! RRRR	R7      R
8X  g   Q hR# )z%Test without data -> no replacements.Nr   r	   z.x: ['x'], y: ['y'], ls: x, w: xyz, label: None)r   r	    )r   z*x: ['x'], y: ['y'], ls: x, w: xyz, label: textz.x: ['x'], y: ['y'], ls: x, w: xyz, label: text)r   r	   r   r   )r   s   &r   test_function_call_without_datar5   =   s     sC <= > =$<= > =sCr*89 : 9sCv.<= > =2.89 : 962<= > =r   c                l    R^R^/pV ! RVP                  4       VP                  4       4      R8X  g   Q hR# )z8Tests with dict input, unpacking via preprocess_pipelineabNz4x: ['a', 'b'], y: [1, 2], ls: x, w: xyz, label: None)keysvaluesr   datas   & r   "test_function_call_with_dict_inputr=   N   s?     CDtyy{DKKM2BC D Cr   c                
   R^^.R^^	.RR/pV ! RRRVR7      R8X  g   Q hV ! RRRVR7      R8X  g   Q hV ! RRRR	VR
7      R8X  g   Q hV ! RRRRVR
7      R8X  g   Q hV ! RRRR	VR7      R8X  g   Q hV ! RRRRVR7      R8X  g   Q hR# )zCTest with dict data -> label comes from the value of 'x' parameter.r7   r8   r   NOTNr<   -x: [1, 2], y: [8, 9], ls: x, w: xyz, label: br   r	   r<   r3   r   r<   ,x: [1, 2], y: [8, 9], ls: x, w: xyz, label: r4   0x: [1, 2], y: [8, 9], ls: x, w: xyz, label: textr   r	   r   r<   r   r;   s   & r   !test_function_call_with_dict_datarG   V   s     !Qq!fc51DsCd+;< = <$/;< = <sCr5:; < ;sCvD9>? @ ?2D9:; < ;6=>? @ ?r   c                   R^^.RR/pV ! RRRVR7      R8X  g   Q hV ! RRRVR7      R8X  g   Q hV ! RRRR	VR
7      R8X  g   Q hV ! RRRRVR
7      R8X  g   Q hV ! RRRR	VR7      R8X  g   Q hV ! RRRRVR7      R8X  g   Q hR# )zETest the case that one var is not in data -> half replaces, half keptr7   r   r?   Nr8   r@   z,x: [1, 2], y: ['b'], ls: x, w: xyz, label: brB   r3   rC   z+x: [1, 2], y: ['b'], ls: x, w: xyz, label: r4   z/x: [1, 2], y: ['b'], ls: x, w: xyz, label: textrF   r   r;   s   & r   -test_function_call_with_dict_data_not_in_datarI   h   s     !Qe$DsCd+:; < ;$/:; < ;sCr59: ; :sCvD9=> ? >2D99: ; :6==> ? >r   c           
        VP                  R\        P                  ! ^^.\        P                  R7      R\        P                  ! ^^	.\        P                  R7      RRR./4      pV ! RRRVR7      R8X  g   Q hV ! RRRVR	7      R8X  g   Q hV ! RRRR
VR7      R8X  g   Q hV ! RRRRVR7      R8X  g   Q hV ! RRRR
VR7      R8X  g   Q hV ! RRRRVR7      R8X  g   Q hR# )zDTest with pandas dataframe -> label comes from ``data["col"].name``.r7   )dtyper8   r   r?   Nr@   rA   rB   r3   rC   rD   r4   rE   rF   )	DataFramenparrayint32)r   pdr<   s   && r   #test_function_call_with_pandas_datarQ   z   s    <<bhh1vRXX>bhh1vRXX>uen. /D sCd+;< = <$/;< = <sCr5:; < ;sCvD9>? @ ?2D9:; < ;6=>? @ ?r   c            	     >   R^^.R^^	.RR/p \        RR7      RR l4       pV! RRRRV R	7      R
8X  g   Q hV! RRRRV R7      R
8X  g   Q hV! RRRRRV R7      R8X  g   Q hV! RRRRRV R7      R8X  g   Q hV! RRRRRV R7      R8X  g   Q hV! RRRRRV R7      R8X  g   Q hR# )zETest without a "replace_names" argument, all vars should be replaced.r7   r8   r   xyzr	   r,   Nc           
      H    R \        V4       R\        V4       RV RV RV 2
# r   r   r   s   &&&&&&r   func_replace_all8test_function_call_replace_all.<locals>.func_replace_all   /    T!WIU47)6"U1#YugNNr   )r   r<   rA   )r   r	   r   r<   r3   )r   r   r<   rD   r4   rE   )r   r	   r   r   r<   )r   Nr?   r   )r<   rU   s     r   test_function_call_replace_allrX      s   !Qq!fc51D#&O 'O T3s>;< = <TSC3TB;< = <T3s"4H:; < ; 	sC3f4H:	;<	; 	s"4H6	78	7 	s&tL:	;<	;r   c                     \        RR.RR7      RR l4       p R^^.R^^	.RR	/pV ! RRRVR
7      R8X  g   Q hV ! RRRVR7      R8X  g   Q hV ! RRRRVR7      R8X  g   Q hV ! RRRRVR7      R8X  g   Q hR# )z<Test with "label_namer=None" -> no label replacement at all.r   r	   Nr
   c           
      H    R \        V4       R\        V4       RV RV RV 2
# r   r   r   s   &&&&&&r   func_no_label1test_no_label_replacements.<locals>.func_no_label   rW   r   r7   r8   r   r?   r@   z0x: [1, 2], y: [8, 9], ls: x, w: xyz, label: NonerB   r3   rC   rD   r4   rE   r   NrS   r   )r[   r<   s     r   test_no_label_replacementsr^      s     S#JDAO BO !Qq!fc51D$St4>? @ ?$#48>? @ ?$S>:; < ;$STB>? @ ?r   c                      \        R R.RR7      RR l4       p R^^.R^^	.RR/p\        P                  ! \        4      ;_uu_ 4        V ! RRRR	R	VR
7       RRR4       R#   + '       g   i     R# ; i)r   r	   r
   c                     R # r   r   )r   r   r	   r+   s   &&&&r   r   /test_more_args_than_pos_parameter.<locals>.func   s    r   r7   r8   r   r?   Nr+   r@   )   )r   r-   r.   	TypeErrorr;   s     r   !test_more_args_than_pos_parameterrd      sl    S#JC@ A !Qq!fc51D	y	!	!T3S#D1 
"	!	!	!s   AA0	c                  4   \        4       R  4       p \        P                  ! RV P                  4      '       g   Q h\        P                  ! RV P                  4      '       d   Q h\        . R7      RR l4       p \        P                  ! RV P                  4      '       d   Q h\        P                  ! RV P                  4      '       d   Q h\        R.R7      RR l4       p \        P                  ! RV P                  4      '       d   Q h\        P                  ! RV P                  4      '       d   Q h\        R	R
.R7      RR l4       p \        P                  ! RV P                  4      '       d   Q h\        P                  ! RV P                  4      '       d   Q hR# )c                    R# zX
Parameters
----------
data : indexable object, optional
    DATA_PARAMETER_PLACEHOLDER
Nr   )r   r    r$   s   &*,r   funcy&test_docstring_addition.<locals>.funcy       r   z#all parameters also accept a stringzthe following parametersr*   Nc                    R# rg   r   r   r   r	   r+   bars   &&&&&r   rh   ri      rj   r   rm   c                    R# rg   r   rl   s   &&&&&r   rh   ri      rj   r   z&the following parameters .*: \*bar\*\.r   tc                    R# rg   r   )r   r   r	   r+   ro   s   &&&&&r   rh   ri      rj   r   z+the following parameters .*: \*x\*, \*t\*\.r   )r   research__doc__)rh   s    r   test_docstring_additionrt      sc     99;U]]KKKKyy4emmDDDDB' ( yy?OOOOyy4emmDDDDUG, - yy?OOOOyyB( ( ( ( S#J/ 0 yy?OOOOyyG( ( ( ( (r   c                 r    Rp \         P                  RV .p\        VRRR7      pRVP                  9  g   Q hR# )zw
Test that the docstring contains the correct *data* parameter stub
for all methods that we run _preprocess_data() on.
zYimport logging; logging.basicConfig(level=logging.DEBUG); import matplotlib.pyplot as pltz-cT)r4   capture_outputzdata parameter docstring errorN)sys
executabler   stderr)programcmdcompleted_procs      r   test_data_parameter_replacementr}      sE    	* 
 >>4
)C/$tN ,>3H3HHHHr   c                   "  a  ] tR tRt o ]P
                  ]P                  ]P                  .t]	P                  P                  R]4      ]! R.R7      R 4       4       t]	P                  P                  R]4      ]! R.R7      R 4       4       tRtV tR# )	TestPlotTypesi	  plotterpng)
extensionsc                    . ROp. ROp\        \        WE4      4      pV! VP                  4       VP                  4       VP	                  4       4       V! VP                  4       WE4       R# )rb   Nrb                  )dictzipsubplotsr9   r:   )selfr   fig_testfig_refr   r	   ddicts   &&&&   r   test_dict_unpackTestPlotTypes.test_dict_unpack  sR     SY!!#

elln	.  "A)r   c           	         . ROp. ROpV! VP                  4       RRRVRV/R7       V! VP                  4       WE4       R# )rb   xvalyvalr@   Nr   r   )r   )r   r   r   r   r   r	   s   &&&&  r   test_data_kwargTestPlotTypes.test_data_kwarg  sD     !!#VVa+	-  "A)r   r   N)__name__
__module____qualname____firstlineno__r   scatterrm   plotplottersr-   markparametrizer   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r   	  s     dhh		2H[[Y1UG,* - 2* [[Y1UG,* - 2*r   r   r]   )rq   rw   numpyrM   r-   
matplotlibr   matplotlib.axesr   matplotlib.testingr   matplotlib.testing.decoratorsr   r   	all_funcsall_func_idsr0   r   r   r5   r=   rG   rI   rQ   rX   r^   rd   rt   r}   r   r   r   r   <module>r      sR   	 
   '   9 = c
<K =K K	}5B => >>  =D >D =@ >@" =? >?" =@ >@(<2@$21(hI"* *r   