
    ;bhX                         d dl Z d dlZd dlmZmZmZmZmZ d dlZ	 e
       Z G d de      Z G d d      Z G d d      Z G d	 d
      Zd Zd Zy)    N)AbstractTkTestrequires_tk
tk_versionpixels_conv
tcl_obj_eqc                      e Zd Zedk\  rdnedk\  rdndZeZdZdZdZ	dZ
dZdZed        Zd	 Zdej"                  fd
ZeddddZddZd Zd ZeddZd ZdddZd Zd ZddddddZdddZdddZ d Z!d Z"d Z#d Z$y) AbstractWidgetTest)	   r          NFTc                     	 | j                   S # t        $ r9 t        | j                  j	                  dd            | _         | j                   cY S w xY w)Ntkscaling)_scalingAttributeErrorfloatrootcall)selfs    H/opt/python-3.12.12/usr/lib/python3.12/test/test_tkinter/widget_tests.pyr   zAbstractWidgetTest.scaling   sE    	!==  	!!$))..y"ABDM== 	!s    ?AAc                     | j                   s| j                  rt        dk\  r|S t        |t              r%dj                  t        | j                  |            S t        |      S )Nr       )	
_stringifywantobjectsr   
isinstancetuplejoinmap_strstr)r   values     r   r$   zAbstractWidgetTest._str   sK    4#3#3
f8LLeU#88C		51225z    c                 >     |||      ry | j                  |||       y N)assertEqual)r   actualexpectedmsgeqs        r   assertEqual2zAbstractWidgetTest.assertEqual2%   s!    fh3/r'   )r,   convr.   c                   |||<   |t         u r|}|r ||      }| j                  s| j                  s1t        |t              rt        j                  |      }nt        |      }|t        }| j                  ||   ||       | j                  |j                  |      ||       |j                  |      }| j                  t        |      d       | j                  |d   ||       y )N)r.         )	_sentinelr   r   r    r!   tkinter_joinr%   r   r/   cget	configurer*   len)r   widgetnamer&   r,   r0   r.   ts           r   
checkParamzAbstractWidgetTest.checkParam*   s    ty HH~H??$"2"2(E*"==2x=:B&,R8&++d+X"=T"Q#!A$R0r'   c                    ||   }|3|j                  t        j                  t        |                  }d| d}| j	                  t
        j                  |xs d      5  |||<   d d d        | j                  ||   |       | j	                  t
        j                  |xs d      5  |j                  ||i       d d d        | j                  ||   |       y # 1 sw Y   txY w# 1 sw Y   +xY w)Nz\Az\Zr   )	formatreescaper%   assertRaisesRegexr5   TclErrorr*   r8   )r   r:   r;   r&   errmsgorigs         r   checkInvalidParamz$AbstractWidgetTest.checkInvalidParam>   s    d|]]299SZ#89F6("%F##G$4$4flC F4L Dt,##G$4$4flCdE]+ Dt, DC DCs   C&C$C!$C-c                 <    |D ]  } | j                   |||fi |  y r)   )r=   )r   r:   r;   valueskwargsr&   s         r   checkParamszAbstractWidgetTest.checkParamsJ   s#    EDOOFD%:6: r'   c                      | j                   ||g|i | d}| j                  ||d|       | j                  ||d|       | j                  ||d|       y )Nexpected integer but got "{}"r   rD   10p皙	@rJ   rF   )r   r:   r;   rH   rI   rD   s         r   checkIntegerParamz$AbstractWidgetTest.checkIntegerParamN   sh    99&90vtR?vtU6BvtS@r'   r0   c                    |D ]  } | j                   |||fd|i|  d}| j                  ||d|       | j                  ||d|       y )Nr0   z+expected floating-point number but got "{}"r   rM   spamr=   rF   )r   r:   r;   r0   rH   rI   r&   rD   s           r   checkFloatParamz"AbstractWidgetTest.checkFloatParamU   s[    EDOOFD%EdEfE >vtR?vtVFCr'   c                     dD ]  }| j                  |||d        dD ]  }| j                  |||d        d}| j                  ||d|       | j                  ||d	|       y )
N)Fr   falsenooffr   r,   )T   trueyesonr\   z#expected boolean value but got "{}"r   rM   rT   rU   )r   r:   r;   r&   rD   s        r   checkBooleanParamz$AbstractWidgetTest.checkBooleanParam\   sq    5EOOFD%!O< 63EOOFD%!O< 46vtR?vtVFCr'   allow_emptyc                j     | j                   ||ddddddddd	d
fi | | j                  ||dd       y )Nz#ff0000z#00ff00z#0000ffz#123456redgreenbluewhiteblackgreyrT   zunknown color name "spam"rM   rP   )r   r:   r;   rb   rI   s        r   checkColorParamz"AbstractWidgetTest.checkColorParame   sT    "Iy)'6	# "	# 	vtV2 	 	4r'   c                      | j                   ||ddddfi | | j                  ||d       | j                  ||dd       y )	Narrowwatchcrossr   nonerT   zbad cursor spec "spam"rM   )rJ   r=   rF   )r   r:   r;   rI   s       r   checkCursorParamz#AbstractWidgetTest.checkCursorParamm   sM    w"NvNf-vtV/ 	 	1r'   c                 b    d }|||<   | j                  ||          | j                  ||d       y )Nc                       y r)    )argss    r   commandz5AbstractWidgetTest.checkCommandParam.<locals>.commandt   s    r'   r   )
assertTruerJ   )r   r:   r;   ru   s       r   checkCommandParamz$AbstractWidgetTest.checkCommandParams   s2    	tt%r*r'   )rD   rb   fullnamesortc                    | j                   ||g|i | ||r4|d   rt        t        |            }nt        t        |d d             dz   }d|xs |ddj                  |d d       t	        |      dkD  rdndd	|d   xs d
}	d|vr|s| j                  ||dd|	z          d|	z   }| j                  ||d|       y )Nr   r   r   z "{}": must be ,    ,r   z or ""	ambiguousrM   badrT   )rJ   r!   sortedr"   r9   rF   )
r   r:   r;   rD   rb   rx   ry   rH   rI   errmsg2s
             r   checkEnumParamz!AbstractWidgetTest.checkEnumParamz   s     	99&9>":"6&>2F"6&"+#67%?F$$IIfSbk*v;?C22J&$&	(G
 &&vtR.9G.C ' EW_FvtVFCr'   c                6   || j                   }|D ]Z  }t        }|}t        |t              r(|r&|t        urt	        |      | j
                  z  }t        } | j                  |||f||d| \ d}	| j                  ||d|	       | j                  ||d|	       y )Nr,   r0   z7(bad|expected) screen distance ((or "" )?but got )?"{}"6xrM   rT   )	_conv_pixelsr4   r    r%   r   r   roundr=   rF   )
r   r:   r;   r0   rH   rI   r&   r,   conv1rD   s
             r   checkPixelsParamz#AbstractWidgetTest.checkPixelsParam   s    <$$DE HE%%U#-*51DLL@H!EDOOFD% 2(!&2*02  KvtT&AvtVFCr'   c                    d}|r|dz  } | j                   ||g|  ddj                  |d d       d|d   xs d}t        dk  rd }| j                  ||d	|
       y )N)flatgrooveraisedridgesolidsunkenr{   zbad relief "{}": must be r|   r   z, or r   r   rT   rM   )rJ   r"   r   rF   )r   r:   r;   rb   rH   rD   s         r   checkReliefParamz#AbstractWidgetTest.checkReliefParam   sx    IeOF//		&"+&r
"d"$ FvtVFCr'   c                     t        j                  | j                  d      }| j                  |||t               | j                  ||dd       d||<   y )Nimage1)masterr;   rR   rT   zimage "spam" doesn't existrM   r   )r5   
PhotoImager   r=   r%   rF   )r   r:   r;   images       r   checkImageParamz"AbstractWidgetTest.checkImageParam   sQ    ""$))(Ce#6vtV4 	 	6tr'   c                 6    | j                  |||t               y )NrR   )r=   r%   )r   r:   r;   vars       r   checkVariableParamz%AbstractWidgetTest.checkVariableParam   s    c4r'   c                     | j                  |       | j                  |t               t        |      dk7  r| j	                  d|       |D ](  }t        |t              r| j	                  d|        y  y )Nr3   zInvalid bounding box: )assertIsNotNoneassertIsInstancer!   r9   failr    int)r   bboxitems      r   assertIsBoundingBoxz&AbstractWidgetTest.assertIsBoundingBox   s`    T"dE*t9>IID:;DdC(		>? r'   c                    | j                         }|j                         }| j                  t        |      t        |j	                                      |D ]  }||    	 t
        j                  j                  ruddddddd}t        |      }t        | j                        }t        ||z
        D ]:  }||v r||   |v r||   |v rt        | j                  j                  d|d	       < y y )
Nborderwidth
backgroundbackgroundimage
foregroundinvalidcommandvalidatecommand)bdbgbgimgfginvcmdvcmdz.OPTIONS doesn't contain "")createkeysr*   r   r8   testsupportverbosesetOPTIONSprint	__class____name__)r   r:   r   kaliasesr,   s         r   	test_keyszAbstractWidgetTest.test_keys   s    {{}vf.>.>.@'ABA1I  <<#"*"*)G t9D4<<(HD8O,W
d*
h.>>22A7 8	 -  r'   r)   )%r   
__module____qualname__r   _default_pixelsr   r   _conv_pad_pixelsr   _clip_highlightthickness	_clip_pad_clip_borderwidth_allow_empty_justifypropertyr   r$   object__eq__r/   r4   r=   rF   rJ   rQ   r   rV   r`   rj   rp   rw   r   r   r   r   r   r   r   rs   r'   r   r	   r	      s    &&0bJ&<PbVXOLJ#I ! ! 26&-- 0
 ;D$1(
-;A ;@ DD <@ 41+ #!D, #D" =B 
D58r'   r	   c                      e Zd ZdZd Zd Zd Zd Zd Zd Z	 e
dd	      d
        Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d  Z! e
dd	      d!        Z" e
dd	      d"        Z#d# Z$d$ Z%d% Z&d& Z'd' Z(d( Z)d) Z*d* Z+d+ Z,d, Z-d- Z. e
dd	      d.        Z/d/ Z0d0 Z1d1 Z2d2 Z3d3 Z4d4 Z5d5 Z6d6 Z7d7 Z8d8 Z9d9 Z:d: Z;d; Z<d< Z=y=)>StandardOptionsTests)*activebackgroundactiveborderwidthactiveforegroundanchorr   bitmapr   compoundcursordisabledforegroundexportselectionfontr   highlightbackgroundhighlightcolorhighlightthicknessr   insertbackgroundinsertborderwidthinsertofftimeinsertontimeinsertwidthjumpjustifyorientpadxpadyreliefrepeatdelayrepeatintervalselectbackgroundselectborderwidthselectforegroundsetgrid	takefocustexttextvariabletroughcolor	underline
wraplengthxscrollcommandyscrollcommandc                 H    | j                         }| j                  |d       y )Nr   r   rj   r   r:   s     r   test_configure_activebackgroundz4StandardOptionsTests.test_configure_activebackground       V%78r'   c           
      T    | j                         }| j                  |ddddddd       y )Nr   r   ?g333333@r   rN   r   r   r   s     r    test_configure_activeborderwidthz5StandardOptionsTests.test_configure_activeborderwidth   -    f&9c1b%	9r'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   test_configure_activeforegroundz4StandardOptionsTests.test_configure_activeforeground   r   r'   c                 H    | j                         }| j                  |d       y )Nactivereliefr   r   r   s     r   test_configure_activereliefz0StandardOptionsTests.test_configure_activerelief   s    fn5r'   c                 Z    | j                         }| j                  |ddddddddd	d
       y )Nr   nneesesswwnwcenterr   r   r   s     r   test_configure_anchorz*StandardOptionsTests.test_configure_anchor   s3    FHT3c4dH	Fr'   c                     | j                         }| j                  |d       d| j                  v r| j                  |d       y y )Nr   r   r   rj   r   r   s     r   test_configure_backgroundz.StandardOptionsTests.test_configure_background   >    V\24<<  .  r'   r   r   c                 H    | j                         }| j                  |d       y )Nr   r   r   r   s     r   test_configure_backgroundimagez3StandardOptionsTests.test_configure_backgroundimage  s    V%67r'   c                    | j                         }| j                  |dd       | j                  |dd       t        j                  j	                  dd      }| j                  |dd|z          d| j
                  j                  j                  d	d
      v rd| j
                  j                         v s| j                  |ddd       y y )Nr   	questheadgray50z
python.xbm
imghdrdata)subdir@aquar   windowingsystemAppKitrT   zbitmap "spam" not definedrM   )
r   r=   r   r   findfiler   r   r   winfo_serverrF   )r   r:   filenames      r   test_configure_bitmapz*StandardOptionsTests.test_configure_bitmap  s    +6(3<<((l(K#.9 $)),,++D2CDDDII2244""68V6 # 8 5r'   c           	      >   | j                         }| j                  |dddddd       | j                  rdnd}| j                  |dd|| j                         d	| j
                  v r8| j                  |d	ddddd       | j                  |d	d|| j                         y y )
Nr   r   r   @r   rN   r   r   r   )r   r   r   r=   r   r   r   r:   r,   s      r   test_configure_borderwidthz/StandardOptionsTests.test_configure_borderwidth  s    fmc1e	5..1BrH!.. 	 	04<<!!&$3QFOOFD"x!%!2!2  4  r'   c           
      T    | j                         }| j                  |ddddddd       y )Nr   bottomr  leftro   righttopr  r   s     r   test_configure_compoundz,StandardOptionsTests.test_configure_compound$  s-    FJ(FFGU	Dr'   c                 H    | j                         }| j                  |d       y )Nr   )r   rp   r   s     r   test_configure_cursorz*StandardOptionsTests.test_configure_cursor)      fh/r'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   !test_configure_disabledforegroundz6StandardOptionsTests.test_configure_disabledforeground-  s    V%9:r'   c                 H    | j                         }| j                  |d       y )Nr   r   r`   r   s     r   test_configure_exportselectionz3StandardOptionsTests.test_configure_exportselection1  s    v'89r'   c                     | j                         }| j                  |dd       |j                  j                  dk(  }|s| j	                  |ddd       y y )Nr   z3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*tkinter.ttkr   zfont "" doesn't existrM   )r   r=   r   r   rF   )r   r:   is_ttks      r   test_configure_fontz(StandardOptionsTests.test_configure_font5  s\    M	O!!,,=""662*B # D r'   c                     | j                         }| j                  |d       d| j                  v r| j                  |d       y y )Nr   r   r  r   s     r   test_configure_foregroundz.StandardOptionsTests.test_configure_foreground>  r  r'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   "test_configure_highlightbackgroundz7StandardOptionsTests.test_configure_highlightbackgroundD  s    V%:;r'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   test_configure_highlightcolorz2StandardOptionsTests.test_configure_highlightcolorH  s    V%56r'   c           	          | j                         }| j                  |dddddd       | j                  rdnd}| j                  |dd|| j                         y )	Nr   r   r   r%  r   rN   r   r   )r   r   r   r=   r   r&  s      r   !test_configure_highlightthicknessz6StandardOptionsTests.test_configure_highlightthicknessL  s]    f&:c1e	55512 4b8!.. 	 	0r'   c                 H    | j                         }| j                  |d       y )Nr   r  r   s     r   test_configure_imagez)StandardOptionsTests.test_configure_imageT  s    VW-r'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   test_configure_insertbackgroundz4StandardOptionsTests.test_configure_insertbackgroundX  r   r'   c           
      T    | j                         }| j                  |ddddddd       y )Nr   r   r   r%  r   r   rN   r   r   s     r    test_configure_insertborderwidthz5StandardOptionsTests.test_configure_insertborderwidth\  r   r'   c                 J    | j                         }| j                  |dd       y )Nr   d   r   rQ   r   s     r   test_configure_insertofftimez1StandardOptionsTests.test_configure_insertofftimea  s    v<r'   c                 J    | j                         }| j                  |dd       y )Nr   rI  rJ  r   s     r   test_configure_insertontimez0StandardOptionsTests.test_configure_insertontimee  s    v~s;r'   c                 P    | j                         }| j                  |ddddd       y )Nr   r   r%  r   rN   r   r   s     r   test_configure_insertwidthz/StandardOptionsTests.test_configure_insertwidthi  s%    fmS#r5Ir'   c                 H    | j                         }| j                  |d       y )Nr   r4  r   s     r   test_configure_jumpz(StandardOptionsTests.test_configure_jumpm  s    vv.r'   c                 x    | j                         }d}| j                  r|dz  } | j                  |dg|ddi y )N)r*  r+  r  r{   r   rx   justification)r   r   r   )r   r:   rH   s      r   test_configure_justifyz+StandardOptionsTests.test_configure_justifyq  sG    ,$$eOFFI 	6 	6%4	6r'   c                     | j                         }| j                  t        |d         | j                         | j	                  |ddd       y )Nr   
horizontalvertical)r   r*   r%   default_orientr   r   s     r   test_configure_orientz*StandardOptionsTests.test_configure_orienty  sA    VH-.0C0CDFHlJGr'   c           	          | j                         }| j                  |ddddd| j                         | j                  rdnd}| j	                  |dd|| j                  	       y )
Nr      皙@ffffff@12mrR   r   r   r   r   r   r   r   r=   r&  s      r   test_configure_padxz(StandardOptionsTests.test_configure_padx~  d    ffac5#'#8#8 	 	:1BX!22 	 	4r'   c           	          | j                         }| j                  |ddddd| j                         | j                  rdnd}| j	                  |dd|| j                  	       y )
Nr   r[  r\  r]  r^  rR   r   r   r   r_  r&  s      r   test_configure_padyz(StandardOptionsTests.test_configure_pady  ra  r'   c                 J    | j                         }| j                  |dd       y )Nplaceholderxxxr   r=   r   s     r   test_configure_placeholderz/StandardOptionsTests.test_configure_placeholder  s    u5r'   c                 H    | j                         }| j                  |d       y )Nplaceholderforegroundr   r   s     r   $test_configure_placeholderforegroundz9StandardOptionsTests.test_configure_placeholderforeground  s    V%<=r'   c                 H    | j                         }| j                  |d       y )Nr   r  r   s     r   test_configure_reliefz*StandardOptionsTests.test_configure_relief  r0  r'   c                 L    | j                         }| j                  |ddd       y )Nr     rJ  r   s     r   test_configure_repeatdelayz/StandardOptionsTests.test_configure_repeatdelay  s!    v}dC@r'   c                 L    | j                         }| j                  |ddd       y )Nr   ro  rp  rJ  r   s     r   test_configure_repeatintervalz2StandardOptionsTests.test_configure_repeatinterval  s"    v'7sCr'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   test_configure_selectbackgroundz4StandardOptionsTests.test_configure_selectbackground  r   r'   c                 P    | j                         }| j                  |ddddd       y )Nr   r   r%  r   rN   r   r   s     r    test_configure_selectborderwidthz5StandardOptionsTests.test_configure_selectborderwidth  s&    f&93ROr'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   test_configure_selectforegroundz4StandardOptionsTests.test_configure_selectforeground  r   r'   c                 H    | j                         }| j                  |d       y )Nr   r4  r   s     r   test_configure_setgridz+StandardOptionsTests.test_configure_setgrid      vy1r'   c                 N    | j                         }| j                  |dddd       y )Nstateactivedisablednormalr  r   s     r   test_configure_statez)StandardOptionsTests.test_configure_state  s#    FGXz8Lr'   c                 N    | j                         }| j                  |dddd       y )Nr   01r   r   rJ   r   s     r   test_configure_takefocusz-StandardOptionsTests.test_configure_takefocus  s#    c3;r'   c                 L    | j                         }| j                  |ddd       y )Nr   r   z
any stringr  r   s     r   test_configure_textz(StandardOptionsTests.test_configure_text  s!    \:r'   c                     | j                         }t        j                  | j                        }| j	                  |d|       y )Nr   )r   r5   	StringVarr   r   r   r:   r   s      r   test_configure_textvariablez0StandardOptionsTests.test_configure_textvariable  s3    		*<r'   c                 H    | j                         }| j                  |d       y )Ntiler4  r   s     r   test_configure_tilez(StandardOptionsTests.test_configure_tile  s    vv.r'   c                 H    | j                         }| j                  |d       y )Nr   r   r   s     r   test_configure_troughcolorz/StandardOptionsTests.test_configure_troughcolor      V]3r'   c                    | j                         }| j                  |dddd       t        dk\  r|j                  j                  dk(  }| j                  |dd|rdn| j                         | j                  |dd	|rd	nd
       | j                  |dd|rdnd       | j                  |ddd       | j                  |ddd       d}nd}| j                  |dd|       | j                  |dd|       | j                  |dd|       y )Nr   r   r\   
   r   r7  r   r[   z5+2r   z5-2r[  endzend-2zObad index "{}": must be integer\?\[\+-\]integer\?, end\?\[\+-\]integer\?, or ""rL   rM   rN   rO   )r   rJ   r   r   r   r=   r   rF   )r   r:   r8  rD   s       r   test_configure_underlinez-StandardOptionsTests.test_configure_underline  s   aB7%%00MAFOOFK+1Rt7K7K  MOOFK.4U!  =OOFK.4U!  =OOFKOGOOFK7OK6F 5F""6;6"Jv{E&Iv{CGr'   c                 J    | j                         }| j                  |dd       y )Nr   rI  r   r   s     r   test_configure_wraplengthz.StandardOptionsTests.test_configure_wraplength  s    flC8r'   c                 H    | j                         }| j                  |d       y )Nr   r   rw   r   s     r   test_configure_xscrollcommandz2StandardOptionsTests.test_configure_xscrollcommand      v'78r'   c                 H    | j                         }| j                  |d       y )Nr   r  r   s     r   test_configure_yscrollcommandz2StandardOptionsTests.test_configure_yscrollcommand  r  r'   c                 H    | j                         }| j                  |d       y )Nru   r  r   s     r   test_configure_commandz+StandardOptionsTests.test_configure_command  r|  r'   c                 H    | j                         }| j                  |d       y )Nindicatoronr4  r   s     r   test_configure_indicatoronz/StandardOptionsTests.test_configure_indicatoron  s    v}5r'   c                 H    | j                         }| j                  |d       y )N	offreliefr  r   s     r   test_configure_offreliefz-StandardOptionsTests.test_configure_offrelief  s    fk2r'   c                 Z    | j                         }| j                  |dt        dk\         y )N
overreliefr   ra   )r   r   r   r   s     r   test_configure_overreliefz.StandardOptionsTests.test_configure_overrelief  s-    fl+5+? 	 	Br'   c                 H    | j                         }| j                  |d       y )Nselectcolorr   r   s     r   test_configure_selectcolorz/StandardOptionsTests.test_configure_selectcolor  r  r'   c                 H    | j                         }| j                  |d       y )Nselectimager  r   s     r   test_configure_selectimagez/StandardOptionsTests.test_configure_selectimage  r  r'   c                 H    | j                         }| j                  |d       y )Ntristateimager  r   s     r   test_configure_tristateimagez1StandardOptionsTests.test_configure_tristateimage
  s    V_5r'   c                 J    | j                         }| j                  |dd       y )Ntristatevalue
unknowablerg  r   s     r   test_configure_tristatevaluez1StandardOptionsTests.test_configure_tristatevalue  s    >r'   c                     | j                         }t        j                  | j                        }| j	                  |d|       y )Nvariable)r   r5   	DoubleVarr   r   r  s      r   test_configure_variablez,StandardOptionsTests.test_configure_variable  s3    		*
C8r'   N)>r   r   r   STANDARD_OPTIONSr   r   r   r  r  r  r   r  r#  r'  r-  r/  r2  r5  r9  r;  r=  r?  rA  rC  rE  rG  rK  rM  rO  rQ  rT  rY  r`  rc  rh  rk  rm  rq  rs  ru  rw  ry  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rs   r'   r   r   r      s   99
96F
/ A8 88
4D
0;:D/<70.99
=<J/6H
44 A6 6 A> >0AD9P92M<;=
 A/ /4H*999263B
446?9r'   r   c                       e Zd Zd Zd Zy)IntegerSizeTestsc                 N    | j                         }| j                  |dddd       y )NheightrI  r   rJ  r   s     r   test_configure_heightz&IntegerSizeTests.test_configure_height  s#    vxdA>r'   c                 N    | j                         }| j                  |dddd       y )Nwidth  nr   rJ  r   s     r   test_configure_widthz%IntegerSizeTests.test_configure_width  s#    vwT1=r'   Nr   r   r   r  r  rs   r'   r   r  r    s    ?>r'   r  c                       e Zd Zd Zd Zy)PixelSizeTestsc           
      T    | j                         }| j                  |ddddddd       y )Nr  rI  gLY@gfffffY@r  r   3cr   r   s     r   r  z$PixelSizeTests.test_configure_height#  s)    fhUE4DQr'   c           
      T    | j                         }| j                  |ddddddd       y )Nr  r  gfffff6y@gIy@r  r   5ir   r   s     r   r  z#PixelSizeTests.test_configure_width'  s)    fgsE5$4Pr'   Nr  rs   r'   r   r  r  "  s    RQr'   r  c                        fd}|S )Nc           
            j                   D ][  }d|z   }t         |      rD ]'  }t        ||      st         |t        ||              @ |f fd	}||_        t         ||       ]  S )Ntest_configure_c                 d    | j                         }||    t        d|dj                        )NzOption "z" is not tested in )r   AssertionErrorr   )r   optionr:   clss      r   r   z5add_standard_options.<locals>.decorator.<locals>.test:  s3    !%v,.4cll.D E Er'   )r   hasattrsetattrgetattrr   )r  r  
methodnamesource_classr   source_classess   `    r   	decoratorz'add_standard_options.<locals>.decorator0  sz    kkF*V3J3
+$2L|Z8Z 'j AC	 %3 +1 E
 %/DMCT2 "  
r'   rs   )r  r  s   ` r   add_standard_optionsr  ,  s    $ r'   c                      t         j                  j                  r3t        j                         } t        d| j                  dd      d       y y )Nzpatchlevel =info
patchlevelT)flush)r   r   r   r5   Tclr   r   )tcls    r   setUpModuler  D  s6    ||kkmnchhv|<DI r'   )r@   r5   test.test_tkinter.supportr   r   r   r   r   test.supportr   r   r4   r	   r   r  r  r  r  rs   r'   r   <module>r     s`    
 ; ;  H	L8 L8^z9 z9z	> >Q Q0Jr'   