AlkantarClanX12

Your IP : 18.188.96.17


Current Path : /proc/thread-self/root/lib64/python2.7/lib-tk/test/
Upload File :
Current File : //proc/thread-self/root/lib64/python2.7/lib-tk/test/widget_tests.pyo

�
zfc@sVddlZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZddl
ZeZZe
�dddfkr�eZneo�ee�Zd�ZeZe
�d dddfkr�eZne�Zd	efd
��YZdefd��YZd
efd��YZdefd��YZd�Zd�ZdS(i����N(tScale(tAbstractTkTestttcl_versiontrequires_tcltget_tk_patchleveltpixels_convt
tcl_obj_eqiiicCstt|��S(N(tinttround(tx((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	int_roundsitAbstractWidgetTestcBs�eZee�ZdZeZe	d��Z
d�Zdej
d�Zeedd�Zded�Zd�Zd�Zd�Zd�Zdd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Z RS(cCsEy|jSWn3tk
r@t|jjdd��|_|jSXdS(Nttktscaling(t_scalingtAttributeErrortfloattroottcall(tself((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR
"s

cCsU|jr#|jr#tdkr#|St|t�rKdjt|j|��St|�S(Niit (ii(	t
_stringifytwantobjectsRt
isinstancettupletjointmapt_strtstr(Rtvalue((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR*s
cCs*|||�rdS|j|||�dS(N(tassertEqual(Rtactualtexpectedtmsgteq((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytassertEqual21scCs|||<|tkr|}n|r4||�}n|jsG|jrwt|t�rhtj|�}qwt|�}n|dkr�t	}n|j
|||d|�|j
|j|�|d|�t|t�s|j
|�}|jt|�d�|j
|d|d|�ndS(NR"ii(t	_sentinelRRRRttkintert_joinRtNoneRR#tcgetRt	configureRtlen(RtwidgettnameRR tconvR"tt((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt
checkParam6s"
		c	Cs||}|dk	r(|j|�}n|jtj��}|||<WdQX|dk	ru|jt|j�|�n|r�|j|||�n
|||<|jtj��}|ji||6�WdQX|dk	r�|jt|j�|�n|r|j|||�n
|||<dS(N(	R'tformattassertRaisesR%tTclErrorRRt	exceptionR)(RR+R,Rterrmsgt	keep_origtorigtcm((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckInvalidParamLs"

cOs+x$|D]}|j||||�qWdS(N(R/(RR+R,tvaluestkwargsR((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckParamsbs
cOse|j||||�|j||ddd�|j||ddd�|j||ddd�dS(NtR4sexpected integer but got ""t10psexpected integer but got "10p"g������	@sexpected integer but got "3.2"(R;R8(RR+R,R9R:((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckIntegerParamfscOs�d|kr|jd�}nt}x*|D]"}|j|||d||�q+W|j||ddd�|j||ddd�dS(NR-R<R4s)expected floating-point number but got ""tspams-expected floating-point number but got "spam"(tpopRR/R8(RR+R,R9R:R-R((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckFloatParamos
 cCs�x6tddddfD]}|j|||dd�qWx6tdddd	fD]}|j|||dd�qOW|j||d
dd�|j||d
dd�dS(NitfalsetnotoffR ittruetyestonR<R4s!expected boolean value but got ""R?s%expected boolean value but got "spam"(tFalseR/tTrueR8(RR+R,R((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckBooleanParam{scKsN|j||ddddddddd	d
|�|j||ddd
�dS(Ns#ff0000s#00ff00s#0000ffs#123456tredtgreentbluetwhitetblacktgreyR?R4sunknown color name "spam"(R;R8(RR+R,tallow_emptyR:((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckColorParam�scKs^|j||dddd|�tdkrA|j||d�n|j||dd	d
�dS(NtarrowtwatchtcrossR<iitnoneR?R4sbad cursor spec "spam"(ii(R;RR/R8(RR+R,R:((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckCursorParam�s
cCs;d�}|||<|j||�|j||d�dS(NcWsdS(N((targs((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcommand�sR<(t
assertTrueR;(RR+R,RY((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckCommandParam�s	
cOs�d|kr|jd�}nd}|j||||�|dkr�d|dj|d �t|�dkrtdnd|df}|j||ddd|�d	|}n|j||d
d|�dS(NR4s %s "{}": must be %s%s or %ss, i����it,R<t	ambiguoustbadR?(R@R'R;RR*R8(RR+R,R9R:R4terrmsg2((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckEnumParam�s
c

Os!d|kr|jd�}nd}|dkr<|j}nd|krZ|jd�}nt}x||D]t}t}|}	t|t�r�|	r�|	tk	r�t|�|j}t	}	q�n|j
|||d|d|	|�qgW|j||dddd|�|j||dddd|�dS(	NR-R5R t6xR4sbad screen distance "6x"R?sbad screen distance "spam"(R@R't_conv_pixelsRIR$RRRR
R
R/R8(
RR+R,R9R:R-R5RR tconv1((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckPixelsParam�s*

c	CsZ|j||dddddd�d}tdkr=d}n|j||d
d|�dS(
NtflattgroovetraisedtridgetsolidtsunkensHbad relief "spam": must be flat, groove, raised, ridge, solid, or sunkeniiR?R4(ii(R;RR'R8(RR+R,R4((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckReliefParam�s	cCs[tjd|jdd�}|j|||dt�|j||ddd�d||<dS(	NtmasterR,timage1R-R?R4simage "spam" doesn't existR<(R%t
PhotoImageRR/RR8(RR+R,timage((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckImageParam�s
cCs|j|||dt�dS(NR-(R/R(RR+R,tvar((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytcheckVariableParam�scCs�|j|�|j|t�t|�dkrF|jd|f�nx5|D]-}t|t�sM|jd|f�PqMqMWdS(NisInvalid bounding box: %r(tassertIsNotNonetassertIsInstanceRR*tfailRR(Rtbboxtitem((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytassertIsBoundingBox�s

cCs|j�}|j�}t|t�sL|jt|�t|j���nx|D]}||qSWtjj	ridd6dd6dd6dd6d	d
6}t
|�}t
|j�}x_t||�D]J}||ko�|||ko�|||ks�d|jj
|fGHq�q�WndS(Ntborderwidthtbdt
backgroundtbgt
foregroundtfgtinvalidcommandtinvcmdtvalidatecommandtvcmds%s.OPTIONS doesn't contain "%s"(tcreatetkeysRRRtsortedR)ttestttest_supporttverbosetsettOPTIONSt	__class__t__name__(RR+R�tktaliasesR ((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	test_keys�s*%

N(!R�t
__module__tstaticmethodtpixels_roundRbR't_conv_pad_pixelsRHRtpropertyR
Rtobjectt__eq__R#R$R/RIR8R;R>RARJRRRWR[R`RdRkRpRrRxR�(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyRs0						
					
			
tStandardOptionsTestsc*BseZdbZd*�Zd+�Zd,�Zd-�Zd.�Zd/�Zd0�Z	d1�Z
d2�Zd3�Zd4�Z
d5�Zd6�Zd7�Zd8�Zd9�Zejejd:kd;�d<��Zd=�Zd>�Zd?�Zd@�ZdA�ZdB�ZdC�ZdD�ZdE�Z dF�Z!dG�Z"dH�Z#dI�Z$dJ�Z%dK�Z&dL�Z'dM�Z(dN�Z)dO�Z*dP�Z+dQ�Z,dR�Z-dS�Z.dT�Z/dU�Z0dV�Z1dW�Z2dX�Z3dY�Z4dZ�Z5d[�Z6d\�Z7e8d]d^�d_��Z9e8d]d^�d`��Z:da�Z;RS(ctactivebackgroundtactiveborderwidthtactiveforegroundtanchorR{tbitmapRytcompoundtcursortdisabledforegroundtexportselectiontfontR}thighlightbackgroundthighlightcolorthighlightthicknessRotinsertbackgroundtinsertborderwidtht
insertofftimetinsertontimetinsertwidthtjumptjustifytorienttpadxtpadytrelieftrepeatdelaytrepeatintervaltselectbackgroundtselectborderwidthtselectforegroundtsetgridt	takefocusttextttextvariablettroughcolort	underlinet
wraplengthtxscrollcommandtyscrollcommandcCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_activebackground
sc	Cs2|j�}|j|ddddddd�dS(NR�ig�������?g333333@ii����R=(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_activeborderwidthscCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_activeforegroundscCs;|j�}|j|ddddddddd	d
�dS(NR�tntnetetsetstswtwtnwtcenter(R�R`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_anchorscCsB|j�}|j|d�d|jkr>|j|d�ndS(NR{R|(R�RRR�(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_backgroundscCs�|j�}|j|dd�|j|dd�tjjddd�}|j|dd|�d|jjjd	d
�ko�d|jj�ks�|j	|ddd
d�ndS(NR�t	questheadtgray50s
python.xbmtsubdirt
imghdrdatat@taquaRtwindowingsystemtAppKitR?R4sbitmap "spam" not defined(
R�R/R�R�tfindfileRRRtwinfo_serverR8(RR+tfilename((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_bitmap%sc	Csf|j�}|j|ddddddd�d|jkrb|j|ddddddd�ndS(	NRyig�������?g������@ii����R=Rz(R�RdR�(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_borderwidth2s
c	Cs2|j�}|j|ddddddd�dS(NR�tbottomR�tleftRVtrightttop(R�R`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt
test_compound9scCs |j�}|j|d�dS(NR�(R�RW(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_cursor>scCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_disabledforegroundBscCs |j�}|j|d�dS(NR�(R�RJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_exportselectionFscCs<|j�}|j|dd�|j|dddd�dS(NR�s3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*R<R4sfont "" doesn't exist(R�R/R8(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	test_fontJs
cCsB|j�}|j|d�d|jkr>|j|d�ndS(NR}R~(R�RRR�(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_foregroundQscCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_highlightbackgroundWscCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_highlightcolor[scCsQ|j�}|j|dddddd�|j|ddddd	|j�dS(
NR�ig�������?g������@iR=i����R R-(R�RdR/Rb(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_highlightthickness_s
tdarwins"crashes with Cocoa Tk (issue19733)cCs |j�}|j|d�dS(NRo(R�Rp(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt
test_imagefscCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertbackgroundlsc	Cs2|j�}|j|ddddddd�dS(NR�ig�������?g������@ii����R=(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertborderwidthpscCs#|j�}|j|dd�dS(NR�id(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertofftimeuscCs#|j�}|j|dd�dS(NR�id(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertontimeyscCs,|j�}|j|ddddd�dS(NR�g�������?g������@i����R=(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertwidth}scCs |j�}|j|d�dS(NR�(R�RJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	test_jump�scCsH|j�}|j|dddddd�|j|dddd�dS(	NR�R�R�R�R4s6bad justification "{}": must be left, right, or centerR<s:ambiguous justification "": must be left, right, or center(R�R`R8(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_justify�s
cCsC|j�}|jt|d�|j�|j|ddd�dS(NR�t
horizontaltvertical(R�RRtdefault_orientR`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_orient�sc
Cs8|j�}|j|ddddddd|j�dS(NR�ig������@gffffff@i����t12mR-(R�RdR�(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	test_padx�sc
Cs8|j�}|j|ddddddd|j�dS(NR�ig������@gffffff@i����R�R-(R�RdR�(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	test_pady�scCs |j�}|j|d�dS(NR�(R�Rk(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_relief�scCs&|j�}|j|ddd�dS(NR�i���i�(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_repeatdelay�scCs&|j�}|j|ddd�dS(NR�i���i�(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_repeatinterval�scCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectbackground�scCs,|j�}|j|ddddd�dS(NR�g�������?g������@i����R=(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectborderwidth�scCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectforeground�scCs |j�}|j|d�dS(NR�(R�RJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_setgrid�scCs)|j�}|j|dddd�dS(Ntstatetactivetdisabledtnormal(R�R`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt
test_state�scCs)|j�}|j|dddd�dS(NR�t0t1R<(R�R;(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_takefocus�scCs&|j�}|j|ddd�dS(NR�R<s
any string(R�R;(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	test_text�scCs5|j�}tj|j�}|j|d|�dS(NR�(R�R%t	StringVarRRr(RR+Rq((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_textvariable�scCs |j�}|j|d�dS(NR�(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_troughcolor�scCs)|j�}|j|dddd�dS(NR�iii
(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_underline�scCs#|j�}|j|dd�dS(NR�id(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_wraplength�scCs |j�}|j|d�dS(NR�(R�R[(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_xscrollcommand�scCs |j�}|j|d�dS(NR�(R�R[(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_yscrollcommand�scCs |j�}|j|d�dS(NRY(R�R[(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_command�scCs |j�}|j|d�dS(Ntindicatoron(R�RJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_indicatoron�scCs |j�}|j|d�dS(Nt	offrelief(R�Rk(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_offrelief�scCs |j�}|j|d�dS(Nt
overrelief(R�Rk(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_overrelief�scCs |j�}|j|d�dS(Ntselectcolor(R�RR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectcolor�scCs |j�}|j|d�dS(Ntselectimage(R�Rp(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectimage�siicCs |j�}|j|d�dS(Nt
tristateimage(R�Rp(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_tristateimage�scCs#|j�}|j|dd�dS(Nt
tristatevaluet
unknowable(R�R/(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_tristatevalue�scCs5|j�}tj|j�}|j|d|�dS(Ntvariable(R�R%t	DoubleVarRRr(RR+Rq((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt
test_variables(*R�R�R�R�R{R�RyR�R�R�R�R�R}R�R�R�RoR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(<R�R�tSTANDARD_OPTIONSR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�tunittesttskipIftsystplatformR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRRR	R
RRR
RRRRRRRRR(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR��s�						
																																											tIntegerSizeTestscBseZd�Zd�ZRS(cCs)|j�}|j|dddd�dS(Ntheightidi����i(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_height	scCs)|j�}|j|dddd�dS(Ntwidthi�in���i(R�R>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt
test_width
s(R�R�R'R)(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR%s	tPixelSizeTestscBseZd�Zd�ZRS(c	Cs2|j�}|j|ddddddd�dS(NR&idg�����LY@gfffff�Y@i����it3c(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR'sc	Cs2|j�}|j|ddddddd�dS(NR(i�gfffff6y@g�����Iy@in���it5i(R�Rd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR)s(R�R�R'R)(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR*s	cs�fd�}|S(Ncs�x��jD]�}d|}t�|�s
xk�D]5}t||�r0t�|t||�j�Pq0q0W|�fd�}||_t�||�q
q
W�S(Nttest_cs1|j�}||td|�jf��dS(NsOption "%s" is not tested in %s(R�tAssertionErrorR�(RtoptionR+(tcls(s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR�)s(R�thasattrtsetattrtgetattrtim_funcR�(R0R/t
methodnametsource_classR�(tsource_classes(R0s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt	decorators

		((R7R8((R7s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytadd_standard_optionsscCs4tjjr0tj�}dG|jdd�GHndS(Nspatchlevel =tinfot
patchlevel(R�R�R�R%tTclR(ttcl((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytsetUpModule3s(R!R#tTkinterR%tttkRttest_ttk.supportRRRRRRttest.test_supportR�RHtnoconvtnoconv_methRR�R
R�RR�R$RR�R%R*R9R>(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt<module>s*.
				��