��Qc@s�ddlZddlZddlZddlZddlmZmZddlZed�dejfd��YZ dejfd��YZ
e e
fZedkr�ee�ndS( i�N(trequirestrun_unittesttguitLabeledScaleTestcBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCstj�dS(N(tsupporttroot_deiconify(tself((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pytsetUp
scCstj�dS(N(Rt
root_withdraw(R((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyttearDownscCstj�}|jj}|j�|jtj|jj |�tj
�}|j}tjd|�}|j�|j|jj |�|j��~|jtj|jj |�tj
�}tjd|�}|j�tjd|�ttd�r|jtjtjk�ndS(Ntvariablet last_type(tttktLabeledScalet _variablet_nametdestroytassertRaisestTkintertTclErrorttktglobalgetvart DoubleVartassertEqualtgettIntVarthasattrtsystassertFalseR(Rtxtvartmyvartname((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_widget_destroys"
"
cs�tj�}�j|jtj�|j�tj�}tj|�}�j|j|�|j�dddddtj dtj dff}xE|D]=}tjd|d�}�j|j
|d�|j�q�Wtjdd �}�jt|j
j�|j�tjdd�}�jt|j
j�|j�tjd
d�}tjd|�}�j|j
d�|j�tjd|dd
�}�j|j
d
��j|j
j|j�|j��fd�}tjdd�}||jd|jd�|j�tjdd�}||jd|jd�|j�tjdd�}||jd|jd�|j�tj�}||jd|jd�|j��jtjtjdd�dS(Ng@it0ii
i�itfrom_s2.5tvalueiR
g�s8�j|j�d|��j|j�d|�dS(Ntsidetanchor(Rt pack_infot
place_info(tscalet scale_postlabelt label_pos(R(s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pytcheck_positionsVstcompoundttoptbottomtntstunknowntatb(g@i(R"i(ii(i
i
(i�i�(RR
RtmasterRt
_default_rootRtFrameRtmaxintR$Rt
ValueErrorRRtNoneRRR)R+R(RRR6tpassed_expectedtpairRR-((Rs:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_initialization3sR
cCsOtjdddd�}|j�|j�|j�|jj�}|jj�d}|j |t
|d��|jjdddd�|j�|jj�d}|j||k�|jj�}|j |jdd�|j |t
|d��|jjdddd�|j||k�|j |t
|d��|j
�dS( NR#ittoi
Ri�ittext(RR
tpacktwait_visibilitytupdateR+R(R)tcoordsRtintt configuret
assertTrueR(Rtlscaletlinfo_1tprev_xcoordtcurr_xcoordtlinfo_2((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_horizontal_rangejs$
cCs7tj�}|j�|j�|j�|jj�d}|jd}||_|j�|j|j d|�|j
|jj�d|k�|j|jj�dt|j j�d��|jdd|_|j�|j|j d|�|j|jj�dt|j j�d��|j
�dS(NiiR@RR?(RR
RARBRCR)RDR$RR+RGRER(R(RRRKtnewval((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_variable_change�s$
cCs�tj�}|jdtdd�|j�|j�|jj�|jj�}}|d|d}}d|_ |j�|jj
d||f�|jt|j
j�d�|jj�d�|jj
d||f�|j�dS( Ntexpandtfilltbothiis%dx%dRi(RR
RAtTrueRBRCR6twinfo_widthtwinfo_heightR$twm_geometryRRER+R(R)RDR(RRtwidththeightt width_newt
height_new((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_resize�s
( t__name__t
__module__RR R!R>RMROR[(((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyRs 7 tOptionMenuTestcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCstj�tj�|_dS(N(RRRt StringVarttextvar(R((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyR�s
cCs|`tj�dS(N(R`RR(R((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyR �scCs�tj�}tjd|�}|j}|j�|j�|j|j j
|�|j��~|jtj
|j j
|�dS(N(RR_Rt
OptionMenuR;Rtupdate_idletasksRRRRRRR(RRtoptmenuR ((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyR!�s
"cCs�|jtjtjd|jdd�tjd|jddd�}|j|jj �d�|j
|d�|j
|d�|j�dS(NtinvalidtthingR5R4tmenuttextvariable(RRRRRaR;R`RRRRGR(RRc((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyR>�sc s1d
�d}tjd�j|��}t}xYtt���D]E}|dj|d�}�j|�|�||kr@t }q@q@W�j
|�|j�d}tjd�j|��}d}d}xTt r#||dj|d�}}||krPn�j
||k�|d7}q�W�j|t���|j�|j�|djd��j|jj��d��jtj|djd ��j|jj��d�|j�g����fd
�}tjd�jdd|��}|djd��s#�jd�n|j�dS(NR4R5tcRfR$tdiii�cs%�j|�d��jt�dS(Ni(RtappendRS(titem(titemsRtsuccess(s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pytcb_teststcommandsMenu callback not invoked(R4R5Rh(RRaR;R`tFalsetrangetlent entrycgetRRSRGRtentryconfigureRRARBtinvokeRRRRRtfail( RtdefaultRct
found_defaulttiR$tcurrtlastRn((RlRRms:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyt test_menu�sJ
(R\R]RR R!R>R|(((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyR^�s
t__main__(
RtunittestRRttest.test_supportRRRtTestCaseRR^t tests_guiR\(((s:/sys/lib/python2.7/lib-tk/test/test_ttk/test_extensions.pyt<module>s
�X
|