
    h<                        S SK r S SKJrJr  S SKJr  S SKJr  S rS r	S r
\ R                  R                  SS	S
0S4SSS.S4SS
0S4SS
0S4SS
// SQS.S4SS
// SQS.S445      S 5       r\ R                  R                  SSS
0S4SS/S S.S 4S!S
0S"4S!S0S#4S$S S%.S&4S'S S%.S(4S)S S%.S*4S+S S,S/S/S-.S.4S+S S,S/S/S/.S044	5      S1 5       rS2 r\" S3/S49S5 5       rg)6    N)assert_allcloseassert_array_equal)Sankey)check_figures_equalc                  8    [        5       n U R                  5         g )N)r   add)sankeys    N/var/www/html/env/lib/python3.13/site-packages/matplotlib/tests/test_sankey.pytest_sankeyr      s    XF
JJL    c                      [        S/S/S/S9n U R                  S   R                  S   R                  5       S:X  d   eg )N      ?First)flowslabelsorientationsr   z
First
0.25r   diagramstextsget_text)ss    r
   
test_labelr      s@    dVWIRDAA::a=q!**,===r   c                      S n [        S/S/S/U S9nUR                  S   R                  S   R                  5       S:X  d   eg )Nc                 
    U S $ )Nz.3f )values    r
   show_three_decimal_places=test_format_using_callable.<locals>.show_three_decimal_places   s    r   r   r   r   )r   r   r   formatr   zFirst
0.250r   )r   r   s     r
   test_format_using_callabler!      sN     	dVWIRD/	1A ::a=q!**,>>>r   zkwargs, msggapr   z'gap' is negative      )r"   radiusz'radius' is greater than 'gap'
head_anglez'head_angle' is negative	tolerancez'tolerance' is negative)r   r   r#   r   r   z/The shapes of 'flows' \(2,\) and 'orientations')abc)r   r   z)The shapes of 'flows' \(2,\) and 'labels'c                     [         R                  " [        US9   [        S0 U D6  S S S 5        g ! , (       d  f       g = f)Nmatchr   )pytestraises
ValueErrorr   )kwargsmsgs     r
   test_sankey_errorsr4      s)     
z	- 
.	-	-s   /
=trunklengthz'trunklength' is negative皙?g333333?)r   priorzThe scaled sum of the connectedr7   z*The index of the prior diagram is negativez#The index of the prior diagram is 1)r   r#   )connectr7   zAt least one of the connection)r$   r#   z"The connection index to the source)r#      z The connection index to this dia)r#   r#   皙ɿ)r8   r7   r   r   zThe value of orientations)r8   r7   r   pathlengthszThe lengths of 'flows'c                     [        5       n[        R                  " [        US9   UR	                  SS/S9  UR                  " S0 U D6  S S S 5        g ! , (       d  f       g = f)Nr-   r6   r:   )r   r   )r   r/   r0   r1   r   )r2   r3   r	   s      r
   test_sankey_add_errorsr=   .   sF     XF	z	-

#t
%

V 
.	-	-s   $A
Ac                     [        / SQS/S/SS9n U R                  5       n[        US   R                  / SQ5        US   R                  / SQ:X  d   e[        US   R                   Vs/ s H  o"R                  5       SS S:H  PM     sn5      (       d   e[        US   R                   Vs/ s H  o"R                  5       S	S  S:H  PM     sn5      (       d   eUS   R                  R                  5       S
:X  d   e[        US   R                  / SQ5        [        / SQS/S/SS9n U R                  5       n[        US   R                  / SQ5        US   R                  / SQ:X  d   e[        US   R                  / SQ5        g s  snf s  snf )N)r         п      ?      Foor   Bar)r   r   r   unitr   )r#   r9   r#   r9   r9    )g      g=ä࿩g      ?g6	t)迩g      gՁAڿg      ?gqXu)r   r?   r   r@   rA   )r#   r9   Nr#   r9   )rG   rH   )r   r   rI   rJ   )r   finishr   r   anglesallr   r   textr   tips)r   sfrN   s      r
   test_sankey2rQ   B   sc   -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   )F,F
png)
extensionsc                     U R                  5       n[        U/ SQ/ SQS9nUR                  5         UR                  5       n[        US9nUR                  / SQ/ SQS9  UR                  5         g )N)r   r?   r?   r   r@   rA   )r#   r   r#   r   r   r   )axr   r   )rU   r(   )gcar   rK   r   )fig_testfig_refax_tests_testax_refs_refs         r
   test_sankey3r]   ^   s]    llnGw&K!57F
MMO[[]FfE	II9/  1	LLNr   )r/   numpy.testingr   r   matplotlib.sankeyr   matplotlib.testing.decoratorsr   r   r   r!   markparametrizer4   r=   rQ   r]   r   r   r
   <module>rc      s    = $ =>
	? R[%&!>?B342122w
3792w/213	) 		
 R56SzA&(IJr]@Aq\891%'GH!$&JK!$&HI!tSkc79!tSkS35) *8 (
 )
r   