+
     ]i!  c                   sP   ^ RI t ^ RIHt ^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHtHt ^ RIHt ^ RIHt R t]! R.R	R
7      R 4       t]! R.4      R 4       t]! R.RR7      R 4       tR t]! R.4      R 4       tR t]! R.R7      R 4       t]! R.R7      R 4       tR tR tR# )    N)Mock)Path)
CustomCellTable)image_comparisoncheck_figures_equal)Bboxc                  s<    R R.p \         P                  ! V R7       R# )br)ZcellColoursN)plttable)Z
cellcolorss    B/usr/lib64/python3.14/site-packages/matplotlib/tests/test_table.pytest_non_squarer      s    sJII*%    ztable_zorder.pngT)Zremove_textc            	      s   R R.RR..p RpR Uu. uF  pRV,          NK  	  pp. p\         P                  ! \        V4      4      p\        V 4       F:  pWV,          pTP	                  V Uu. uF  pRVR,          ,          NK  	  up4       K<  	  \         P
                  ! ^ ^\         P                  ,          ^d4      p\        P                  ! V\         P                  ! V4      ^^R7       \        P                  ! VVVRRR	7       \        P                  ! VVVR
^R	7       \        P                  ! . 4       R# u upi u upi )iR iب iv  i z%d yearz%1.1fg     @@)Zlwzordercenter)cellText	rowLabels	colLabelslocr   zupper centerN)ZFreezeZWind)d   i2   i)npZzeroslenZreversedZappendlinspaceZpir
   ZplotZcosr   Zyticks)datar   xr   r   Zyoffrowts           r   test_zorderr      s   FOFOD #I(12	1Q	I2H88C	N#D~t<t!AfH--t<=  	Aqw$AHHQq	a*IIx!!	 IIx!! 	 JJrN1 3 =s   D6)D;
ztable_labels.pngc                  s   ^p \         P                  ! ^ ^V 4      p\        P                  P	                  V4      pR.V ,          .V ,          p\        P
                  ! 4       pVP                  ^^^4      pVP                  R4       VP                  VVRR7       VP                  ^^^4      pVP                  R4       VP                  VVR.V ,          RR7       VP                  ^^^4      pVP                  R4       VP                  VVRR7       VP                  ^^^4      pVP                  R4       VP                  VVR.V ,          RR7       R	# )
i   1offZbest)r   
rowColoursr   ZHeader)r   r    r   r   )r   
colColoursr   )r   r!   r   r   N)	r   r   r
   ZcmZRdYlGnZfigureZadd_subplotaxisr   )	ZdimcZcoloursr   figax1ax2ax3ax4	            r   test_label_coloursr*   5   s:   
C
Aq#AffmmAG}s"H
**,C
//!Q
"CHHUOIIx    //!Q
"CHHUOIIx !
S(  
 //!Q
"CHHUOIIx    //!Q
"CHHUOIIx !
S(  r   ztable_cell_manipulation.pngZmpl20)Zstylec                 sF   R	pR.\        V4      ,          .^,          pR.\        V4      ,          p\        P                  ! \        V4      ^\        V4      ^,           3RR7      w  rE\        WQ4       F+  w  rgVP	                  VVRVR7       VP                  R4       K-  	  R# )

horizontalr   皙?Ztight)ZnrowsZfigsizeZlayoutr   )	colWidthsr   r   Zedgesr   Nr+   ZverticalZopenZclosedZTZRBZL)r   r
   subplotszipr   r"   )Ztext_placeholdersZcellsr   r-   _Zaxsaxcells   &       r   test_diff_cell_tabler5   Z   s    LEE
"#a'HE
"I\\E
QE
14EgVFAO
#!	 	 	 	 $r   c                  s   Rp \         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  3\         P                  \         P                  \         P                  \         P                  \         P                  33p\	        W4       F  w  r#\        RV^^R7      p\        ;QJ d0    . R VP                  4       P                  4        4       F  NK  	  5M)! R VP                  4       P                  4        4       4      pW58X  d   K  Q h	  R# )r+   )visible_edgesZwidthZheightc              3   s*   "   T F	  w  rVx  K  	  R # 5iN )Z.0r2   Zss   &  r   Z	<genexpr>Z"test_customcell.<locals>.<genexpr>z   s     C#B41Q#Bs   Nr.   r    r    )	r   ZMOVETOZLINETOZ	CLOSEPOLYr1   r   ZtupleZget_pathZiter_segments)ZtypesZcodesr   r#   r4   Zcode         r   test_customcellr;   k   s   LE	dkk4;;T[[I	dkk4;;T[[I	dkk4;;T[[I	dkk4;;T^^L	dkk4;;T[[I	dkk4;;T[[I	dkk4;;T[[I	dkk4;;T[[I	
E E!&1EuC4==?#@#@#BCuuC4==?#@#@#BCCyy "r   ztable_auto_column.pngc                  s~   \         P                  ! ^^4      w  p w  rr4VP                  R4       VP                  R^.R^..RR.RR.RR	7      pVP	                  R
4       VP                  ^4       VP                  . RO4       VP                  R4       VP                  R^.R^..RR.RR.RR	7      pVP	                  R
4       VP                  ^4       VP                  R4       VP                  R4       VP                  R^.R^..RR.RR.RR	7      pVP	                  R
4       VP                  ^4       VP                  R4       VP                  ^ 4       VP                  ^4       VP                  R4       VP                  R^.R^..RR.RR.RR	7      pVP	                  R
4       VP                  ^4       R# )i   r   zFit Textz-very long long text, Longer text than defaultAr/   ZCol1ZCol2r   )r   r   r   r   FN)r=   r       )r
   r0   r"   r   Zauto_set_font_sizeZset_fontsizeZauto_set_column_width)	r$   r%   r&   r'   r(   Ztb1Ztb2Ztb3Ztb4r)   r   test_auto_columnr?   ~   s    #Q 2C	#C HHUO
))q/BAFH*6"  C 5!Rj) HHUO
))q/BAFH*6"  C 5!Rj) HHUO
))q/BAFH*6"  C 5!Rb!a a  HHUO
))q/BAFH*6"  C 5!Rr   c                  sN   \         P                  ! 4       w  r\        V4      pVP                  ^^^^4      p\	        V\
        4      '       g   Q hW2R,          J g   Q h\        R^^RR7      pWBR&   VR,          VJ g   Q hVP                  4        \         P                  ! V4       R# )r>   N)r6   )r>      r9   )r@   r>   )r
   r0   r   Zadd_cellZ
isinstancer   Z
propertiesZsetp)r$   r3   r   r4   Zcell2s        r   test_table_cellsrA      s    llnGC"IE>>!Q1%DdJ'''';vq!48E$K;% 
HHUOr   Zpng)Z
extensionsc                 sB   ^^.^^..pRpR	pV UUu. uF  qU Uu. uF  qf NK  	  upNK  	  pppV P                  4       pVP                  VVVR. R
OR7       VP                  4       p	V	P                  VVVR\        P                  ! RRRR4      R7       R# u upi u uppi )r@   r   r,   皙?皙?)r   r   r   r   Zbboxg?N)ZFooZBar)ZAdaZBob)r,   rB   rC   g333333?)r0   r   r   Zfrom_extents)
fig_testfig_refr   Z
col_labelsZ
row_labelsr   r   Z	cell_textZax_listZax_bboxs
   &&        r   test_table_bboxrF      s    FFD  JJ267$3#&#QC&#&$I7!GMM9&&+	    GMM9&&((c3<	   '7s   BBBBc                 s    ! R  R4      p\         P                  ! 4       p\        R R7      Vn        \        R R7      Vn        \        R R7      Vn        V\         P                  V&   V! R4      V! ^*4      .V! \        P                  ! R^^4      4      V! R4      ..pV P                  4       P                  V4       VP                  4       P                  R	R	.R	R	..4       V P                  P                  4        VP                  P                  4        \         P                  P                  V4       \         P                  P                  V4      '       d   Q hR
# )c                   s,   a  ] tR t^t o R tR tRtV tR# )!test_table_unit.<locals>.FakeUnitc                    R # r7   r8   )selfZthing   &&r   __init__Z*test_table_unit.<locals>.FakeUnit.__init__   s    r   c                rH   )Hellor8   )rI   s   &r   __repr__Z*test_table_unit.<locals>.FakeUnit.__repr__   s    r   r8   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__rK   rM   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   FakeUnitrG      s     		 	r   rN   c                 s    ^ # )r    r8   )vuas   &&&r   <lambda>!test_table_unit.<locals>.<lambda>   s    ar   )Zside_effectc                 rH   r7   r8   )rO   rQ   rJ   r   rR   rS      s    r   c                 s,    \         P                  ! 4       # r7   )munitsZAxisInfo)rP   rQ   rJ   r   rR   rS      s    FOO<Mr   Zyellowi  TrL   N)rT   ZConversionInterfacer   ZconvertZdefault_unitsZaxisinfoZregistrydatetimer0   r   ZcanvasZdrawZassert_not_calledZpopZget_converter)rD   rE   rN   Zfake_convertorr   s   &&   r   test_table_unitrV      s     //1N!.?@N#'4E#FN "/MNN .FOOHh".h''a34htnEGD d#w07G2DEFOO,,.
OO!,,X66666r   c                 s   R . ROR. RO/pV P                  V4      p\        P                  ! 4       w  r4VP                  VRR7      p\	        VP                  4       4       F  w  pw  rx\	        V^ 8X  d   VP                  MVP                  4       FK  w  rYV^ 8X  d   TMV^,           V	3,          P                  4       P                  4       \        V
4      8X  d   KK  Q h	  K  	  R# )ZLetterZNumberr   )r   N)r<   r/   ZC)r   i   i,  )
Z	DataFramer
   r0   r   Z	enumerateZiterrowsZcolumnsZvaluesZget_textZstr)Zpdr   Zdfr$   r3   r   r	   Zindexr   r#   Zcols   &          r   test_table_dataframerW     s     	//D
 
d	BllnGCHHRXH&E$R[[]3<Ea1f

#**EFA1f!A#q01::<EEG3s8SSS F 4r   c                  s   R ^.R^..p \         P                  ! 4       w  r^pVP                  V RVR7      pVR,          P                  4       pWS8X  g   Q RV RV 24       hVR,          P                  4       pWS8X  g   Q RV RV 24       hR# )	rQ   r   Ztop)r   r   ZfontsizezActual:z,got:Nr9   )r>   r>   )r
   r0   r   Zget_fontsize)Z	tableDatar$   r3   Ztest_fontsizer   Zcell_fontsizer:   r   test_table_fontsizerX     s    qC8$IllnGCM
)GAfI**,M)XW]O5+XX)fI**,M)XW]O5+XX)r   ) rU   Zunittest.mockr   Znumpyr   Zmatplotlib.pyplotZpyplotr
   Zmatplotlib.pathr   Zmatplotlib.tabler   r   Zmatplotlib.testing.decoratorsr   r   Zmatplotlib.transformsr   Zmatplotlib.unitsZunitsrT   r   r   r*   r5   r;   r?   rA   rF   rV   rW   rX   r8   r   r   <module>rY      s          . O & !& %&D9 :@ %&'! (!H 01A B & *+,3 -3l$ ( )4 (7 )7<T"	Yr   