+
     ]i<  c                   s   ^ RI t ^ RIHtHt ^ RIHt ^ RIHt R tR t	R t
] P                  P                  RR	R+/R
3R	^R^/R3RR+/R3RR+/R3R^R+.R. R,O/R3R^R+.R. R-O/R334      R 4       t] P                  P                  RRR+/R3RRR.R^ /R3RR+/R3R^/R3RR.R^ /R 3RR/R^ /R!3RR0R^ /R"3RR1R^ RR2R.R^./R#3RR1R^ RR2R.R$^./R%33	4      R& 4       tR' t]! R(.R)7      R* 4       tR# )3    N)assert_allcloseassert_array_equal)Sankey)check_figures_equalc                  s:    \        4       p V P                  4        R # )N)r   add)sankey    C/usr/lib64/python3.14/site-packages/matplotlib/tests/test_sankey.pytest_sankeyr	      s    XF
JJL    c                  s    \        R .R.R.R7      p V P                  ^ ,          P                  ^ ,          P                  4       R8X  g   Q hR# )      ?First)flowslabelsorientationsz
First
0.25Nr   Zdiagramstextsget_text)sr   r   
test_labelr      s@    dVWIRDAA::a=q!**,===r
   c                  s    R  p \        R.R.R.V R7      pVP                  ^ ,          P                  ^ ,          P                  4       R8X  g   Q hR# )c                 s
    V R  # )z.3f )Zvalues   &r   show_three_decimal_placesZ=test_format_using_callable.<locals>.show_three_decimal_places   s    r
   r   r   )r   r   r   ZformatzFirst
0.250Nr   r   )r   r   s     r   test_format_using_callabler      sN     	dVWIRD/	1A ::a=q!**,>>>r
   zkwargs, msgZgapz'gap' is negativeZradiusz'radius' is greater than 'gap'Z
head_anglez'head_angle' is negativeZ	tolerancez'tolerance' is negativer   r   z/The shapes of 'flows' \(2,\) and 'orientations'r   z)The shapes of 'flows' \(2,\) and 'labels'c                 s    \         P                  ! \        VR 7      ;_uu_ 4        \        R/ V B  RRR4       R#   + '       g   i     R# ; i)ZmatchNr   )pytestraises
ValueErrorr   )kwargsmsgs   &&r   test_sankey_errorsr      s/     
z	-	- 
.	-	-	-s	   ;A	Ztrunklengthz'trunklength' is negative皙?g333333?ZpriorzThe scaled sum of the connectedz*The index of the prior diagram is negativez#The index of the prior diagram is 1ZconnectzAt least one of the connectionz"The connection index to the sourcez The connection index to this diazThe value of orientationsZpathlengthszThe lengths of 'flows'c                 s    \        4       p\        P                  ! \        VR 7      ;_uu_ 4        VP	                  RR.R7       VP                  ! R/ V B  RRR4       R#   + '       g   i     R# ; i)r   r    )r   N皙ɿr   )r   r   r   r   r   )r   r   r   s   && r   test_sankey_add_errorsr"   .   sL     XF	z	-	-

#t
%

V 
.	-	-	-s   'A  A1	c                  s   \        . ROR.R.RR7      p V P                  4       p\        V^ ,          P                  . RO4       V^ ,          P                  . R	O8X  g   Q h\        V^ ,          P                   Uu. uF  q"P                  4       R,          R8H  NK  	  up4      '       g   Q h\        V^ ,          P                   Uu. uF  q"P                  4       R
R R8H  NK  	  up4      '       g   Q hV^ ,          P                  P                  4       R8X  g   Q h\        V^ ,          P                  . RO4       \        . ROR.R.RR7      p V P                  4       p\        V^ ,          P                  . RO4       V^ ,          P                  . RO8X  g   Q h\        V^ ,          P                  . RO4       R# u upi u upi )r   ZFooZBar)r   r   r   Zunit:r       NNZ )r         п      ?      r   )   r#   r'   r#   i)g      g=ä࿩g      ?g6	t)迩g      gՁAڿg      ?gqXu)r   r$   r    r%   r&   )r'   r#   Nr'   r#   )r(   r)   )r    r    r*   r+   )r   finishr   r   ZanglesZallr   r   textr   Ztips)r   Zsfr-   s      r   test_sankey2r.   B   sa   -ugDu	.A	
Br!u{{$<=a5<<<'''"Q%++F+$$-+FGGGG"Q%++F+$$-+FGGGGa5:: B&&&BqEJJ)* 	0%Du	.A	
Br!u{{$?@a5<<----BqEJJ)* GFs   9"F7F<Zpng)Z
extensionsc                 s    V P                  4       p\        V. RO. ROR7      pVP                  4        VP                  4       p\        VR7      pVP                  . RO. ROR7       VP                  4        R# )r   )axr   r   )r/   )r   r   N)r   r$   r$   r   r%   r&   )r'   r   r'   r   r    r    )Zgcar   r,   r   )Zfig_testZfig_refZax_testZs_testZax_refZs_refs   &&    r   test_sankey3r0   ^   s]    llnGw&K!57F
MMO[[]FfE	II9/  1	LLNr
   r   )r   r    r'   )ZaZbZc)r   r'   )i   r'   )r'   r#   )r'   r'   r!   )r   Znumpy.testingr   r   Zmatplotlib.sankeyr   Zmatplotlib.testing.decoratorsr   r	   r   r   ZmarkZparametrizer   r"   r.   r0   r   r
   r   <module>r1      s    = $ =>
	? R[%&Q!>?B342122w
3792w/213	) 		
 R56Sz7A&(IJr]@Aq\89'1%'GH!$&JK!$&HI!WtSkqc79!WtSkaS35) *8 (
 )
r
   