python (3.11.7)

(root)/
lib/
python3.11/
tkinter/
test/
__pycache__/
widget_tests.cpython-311.opt-1.pyc

e0MddlZddlZddlmZmZmZmZddlZe	Z
GddeZGddZGddZ
Gd	d
ZdZdZdS)
N)AbstractTkTest
tk_versionpixels_conv
tcl_obj_eqceZdZeZdZdZedZdZ	de
jfdZe
ddddZddZd	Zd
ZeddZd
ZdddZdZdZdddZdddZdZdZdZdZdZdS)AbstractWidgetTestNFc	|jS#t$r7t|jdd|_|jcYSwxYw)Ntkscaling)_scalingAttributeErrorfloatrootcall)selfs M/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/tkinter/test/widget_tests.pyrzAbstractWidgetTest.scalingsW	!= 	!	!	!!$)..y"A"ABBDM=   	!s	>A
	A
c|js|jr
tdkr|St|tr(dt
|j|St|S)N )	
_stringifywantobjectsr
isinstancetuplejoinmap_strstr)rvalues  rrzAbstractWidgetTest._strsa	4#3	
f8L8LLeU##	388C	5112225zzcP|||rdS||||dSN)assertEqual)ractualexpectedmsgeqs     rassertEqual2zAbstractWidgetTest.assertEqual2 s9
2fh	F3/////r!)r&convr(c|||<|tur|}|r||}|js|js9t|trtj|}nt|}|t}|	|||||	|
|||||}|t|d|	|d||dS)N)r()	_sentinelrrrrtkinter_joinrrr)cget	configurer$len)rwidgetnamer r&r*r(ts        r
checkParamzAbstractWidgetTest.checkParam%sty  H	&tH~~H?	)$"2	)(E**
)"=22x==
:B&,R888&++d++X"===T""Q###!A$R00000r!cp||}|||}|tj5}|||<dddn#1swxYwY|(|t|j||||||tj5}|||idddn#1swxYwY|(|t|j|||||dSr#)formatassertRaisesr/TclErrorr$r	exceptionr2)rr4r5r errmsgorigcms       rcheckInvalidParamz$AbstractWidgetTest.checkInvalidParam9sd|]]5))F


w/
0
0	!B F4L	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!S..777t,,,


w/
0
0	,BdE]+++	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,S..777t,,,,,s#AAAC%%C),C)c0|D]}|j|||fi|dSr#)r7)rr4r5valueskwargsr s      rcheckParamszAbstractWidgetTest.checkParamsHs<	;	;EDOFD%::6::::	;	;r!c|j||g|Ri||||dd|||dd|||dddS)Nzexpected integer but got ""r=10pzexpected integer but got "10p"g	@zexpected integer but got "3.2"rDr@)rr4r5rBrCs     rcheckIntegerParamz$AbstractWidgetTest.checkIntegerParamLs9999&999vtR4		6	6	6vtU7		9	9	9vtS7		9	9	9	9	9r!r*c|D]}|j|||fd|i||||dd|||dddS)Nr*rFz)expected floating-point number but got ""rGspamz-expected floating-point number but got "spam"r7r@)rr4r5r*rBrCr s       rcheckFloatParamz"AbstractWidgetTest.checkFloatParamUs	F	FEDOFD%EEdEfEEEEvtRB		D	D	DvtVF		H	H	H	H	Hr!cdD]}||||ddD]}||||d|||dd|||d	d
dS)N)Frfalsenooffr)r&)TtrueyesonrTrFz!expected boolean value but got ""rGrMz%expected boolean value but got "spam"rN)rr4r5r s    rcheckBooleanParamz$AbstractWidgetTest.checkBooleanParam]s5	=	=EOOFD%!O<<<<3	=	=EOOFD%!O<<<<vtR:		<	<	<vtV>		@	@	@	@	@r!)allow_emptycj|j||ddddddddd	d
fi||||dd
dS)Nz#ff0000z#00ff00z#0000ffz#123456redgreenbluewhiteblackgreyrMzunknown color name "spam"rGrI)rr4r5rYrCs     rcheckColorParamz"AbstractWidgetTest.checkColorParamgst"Iy)'6	#	#"	#	#	#	
vtV2		4	4	4	4	4r!c|j||ddddfi||||d|||dddS)	NarrowwatchcrossrFnonerMzbad cursor spec "spam"rG)rDr7r@)rr4r5rCs    rcheckCursorParamz#AbstractWidgetTest.checkCursorParamosmw"NNvNNNf---vtV/		1	1	1	1	1r!czd}|||<||||||ddS)NcdSr#)argss rcommandz5AbstractWidgetTest.checkCommandParam.<locals>.commandvsDr!rF)
assertTruerD)rr4r5rls    rcheckCommandParamz$AbstractWidgetTest.checkCommandParamusN			tt%%%r*****r!rGc(|j||g|Ri||dd|dd|ddt|dkrdndd|d}|||dd	|z
d|z}|||d|
dS)
Nrz "{}": must be z, ,rFz or 	ambiguousrGbadrM)rDrr3r@)rr4r5r=rBrCerrmsg2s       rcheckEnumParamz!AbstractWidgetTest.checkEnumParam|s9999&999>>DDIIfSbSk***v;;??CC222JJ	 G

""64*5*?
#
A
A
AW_FvtVFCCCCCr!c:||j}|D]\}t}|}t|tr)|r'|turt	||jz}t}|j|||f||d|]|||dd|||dddS)Nr&r*6xzbad screen distance "6x"rGrMzbad screen distance "spam")	_conv_pixelsr.rrrrroundr7r@)	rr4r5r*rBrCr r&conv1s	         rcheckPixelsParamz#AbstractWidgetTest.checkPixelsParams<$D	2	2E HE%%%
""U#--*511DL@H!EDOFD%
2(!&
2
2*0
2
2
2
2vtT1		3	3	3vtV3		5	5	5	5	5r!c
|||ddddddd}tdkrd}|||d	|
dS)NflatgrooveraisedridgesolidsunkenzHbad relief "spam": must be flat, groove, raised, ridge, solid, or sunkenrrMrG)rDrr@)rr4r5r=s    rcheckReliefParamz#AbstractWidgetTest.checkReliefParamsu8Wgx	Q	Q	Q?FvtV						r!ctj|jd}||||t|||ddd||<dS)Nimage1)masterr5rKrMzimage "spam" doesn't existrGrF)r/
PhotoImagerr7rr@)rr4r5images    rcheckImageParamz"AbstractWidgetTest.checkImageParamsf"$)(CCCe#666vtV4		6	6	6tr!cB||||tdS)NrK)r7r)rr4r5vars    rcheckVariableParamz%AbstractWidgetTest.checkVariableParams"c44444r!c&||||tt|dkr|d||D]2}t|ts|d|dS3dS)Nr-zInvalid bounding box: )assertIsNotNoneassertIsInstancerr3failrint)rbboxitems   rassertIsBoundingBoxz&AbstractWidgetTest.assertIsBoundingBoxsT"""dE***t99>>IIIDD:;;;		DdC((
			>???
		r!c|}|}|t|t||D]
}||t
jjrwdddddd}t|}t|j	}t||z
D];}||vr|||vr
|||vst|jjd|d:dSdS)	Nborderwidth
background
foregroundinvalidcommandvalidatecommand)bdbgfginvcmdvcmdz.OPTIONS doesn't contain "")
createkeysr$sortedr2testsupportverbosesetOPTIONSprint	__class____name__)rr4rkaliasesr&s      r	test_keyszAbstractWidgetTest.test_keyss,{{}}vf.>.>.@.@'A'ABBB		A1III<	8#""*)Gt99D4<((HD8O,,
8
8W
d**
h..>222AAA7888	8	8
8
8r!r#)r
__module____qualname__r{rz_conv_pad_pixelsrpropertyrrobject__eq__r)r.r7r@rDrJrrOrXrargrnrvr}rrrrrrjr!rrrsLJ
!!X!26&-0000
;D$11111(
-
-
-
-;;;999;@HHHHH@@@<@44444111+++<@DDDDD#55555$55588888r!rcJeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!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.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6S)7StandardOptionsTests)*activebackgroundactiveborderwidthactiveforegroundanchorrbitmaprcompoundcursordisabledforegroundexportselectionfontrhighlightbackgroundhighlightcolorhighlightthicknessrinsertbackgroundinsertborderwidth
insertofftimeinsertontimeinsertwidthjumpjustifyorientpadxpadyreliefrepeatdelayrepeatintervalselectbackgroundselectborderwidthselectforegroundsetgrid	takefocustexttextvariabletroughcolor	underline
wraplengthxscrollcommandyscrollcommandcZ|}||ddS)Nrrrarr4s  rtest_configure_activebackgroundz4StandardOptionsTests.test_configure_activebackground,V%788888r!c
f|}||ddddddddS)Nrr?g333333@rrHrr}rs  r test_configure_activeborderwidthz5StandardOptionsTests.test_configure_activeborderwidthCf&9c1b%	9	9	9	9	9r!cZ|}||ddS)Nrrrs  rtest_configure_activeforegroundz4StandardOptionsTests.test_configure_activeforegroundrr!c
l|}||ddddddddd	d
dS)Nrnneesesswwnwcenterrrvrs  rtest_configure_anchorz*StandardOptionsTests.test_configure_anchorsMFHT3c4dH	F	F	F	F	Fr!c|}||dd|jvr||ddSdS)Nrrrrarrs  rtest_configure_backgroundz.StandardOptionsTests.test_configure_backgroundVV\2224<  ..... r!c|}||dd||ddtjdd}||dd|zd|jjd	d
vrd|jvs|	|ddd
dSdS)Nr	questheadgray50z
python.xbm
imghdrdata)subdir@aquar
windowingsystemAppKitrMzbitmap "spam" not definedrG)
rr7rrfindfilerr
rwinfo_serverr@)rr4filenames   rtest_configure_bitmapz*StandardOptionsTests.test_configure_bitmaps+666(333<((l(KK#.999$),++D2CDDDDDI224444""68V6
#
8
8
8
8
854r!c
|}||dddddddd|jvr||ddddddddSdS)	Nrrr@rrrHr)rr}rrs  rtest_configure_borderwidthz/StandardOptionsTests.test_configure_borderwidthsufmc1b%	9	9	94<!!&$3QEJJJJJ r!c
f|}||ddddddddS)Nrbottomrleftrfrighttoprrs  rtest_configure_compoundz,StandardOptionsTests.test_configure_compoundsGFJ(FFGU	D	D	D	D	Dr!cZ|}||ddS)Nr)rrgrs  rtest_configure_cursorz*StandardOptionsTests.test_configure_cursor+fh/////r!cZ|}||ddS)Nrrrs  r!test_configure_disabledforegroundz6StandardOptionsTests.test_configure_disabledforegrounds,V%9:::::r!cZ|}||ddS)NrrrXrs  rtest_configure_exportselectionz3StandardOptionsTests.test_configure_exportselections,v'899999r!c|}||dd||ddddS)Nrz3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*rFzfont "" doesn't existrG)rr7r@rs  rtest_configure_fontz(StandardOptionsTests.test_configure_fontsdM	O	O	Ovvr&>		@	@	@	@	@r!c|}||dd|jvr||ddSdS)Nrrrrs  rtest_configure_foregroundz.StandardOptionsTests.test_configure_foreground&rr!cZ|}||ddS)Nrrrs  r"test_configure_highlightbackgroundz7StandardOptionsTests.test_configure_highlightbackground,s,V%:;;;;;r!cZ|}||ddS)Nrrrs  rtest_configure_highlightcolorz2StandardOptionsTests.test_configure_highlightcolor0s,V%566666r!c	|}||dddddd||ddd|jdS)	Nrrrr
rrHrrx)rr}r7rzrs  r!test_configure_highlightthicknessz6StandardOptionsTests.test_configure_highlightthickness4skf&:c1e	5	5	5 4b1!.		0	0	0	0	0r!cZ|}||ddS)Nrrrrs  rtest_configure_imagez)StandardOptionsTests.test_configure_image;s+VW-----r!cZ|}||ddS)Nrrrs  rtest_configure_insertbackgroundz4StandardOptionsTests.test_configure_insertbackground?rr!c
f|}||ddddddddS)Nrrrr
rrrHrrs  r test_configure_insertborderwidthz5StandardOptionsTests.test_configure_insertborderwidthCrr!c\|}||dddS)NrdrrJrs  rtest_configure_insertofftimez1StandardOptionsTests.test_configure_insertofftimeHs-v<<<<<r!c\|}||dddS)Nrr,r-rs  rtest_configure_insertontimez0StandardOptionsTests.test_configure_insertontimeLs-v~s;;;;;r!cb|}||ddddddS)Nrrr
rrHrrs  rtest_configure_insertwidthz/StandardOptionsTests.test_configure_insertwidthPs3fmS#r5IIIIIr!cZ|}||ddS)Nrrrs  rtest_configure_jumpz(StandardOptionsTests.test_configure_jumpTs+vv.....r!c|}||ddddd||ddddS)	Nrrrrz6bad justification "{}": must be left, right, or centerrGrFz:ambiguous justification "": must be left, right, or center)rrvr@rs  rtest_configure_justifyz+StandardOptionsTests.test_configure_justifyXsoFIvw0		1	1	1	
vy"0		1	1	1	1	1r!c|}|t|d|j||ddddS)Nr
horizontalvertical)rr$rdefault_orientrvrs  rtest_configure_orientz*StandardOptionsTests.test_configure_orientasUVH-..0CDDDFHlJGGGGGr!c
r|}||dddddd|jdS)Nr皙@ffffff@r12mrKrr}rrs  rtest_configure_padxz(StandardOptionsTests.test_configure_padxfJffac2u#'#8		:	:	:	:	:r!c
r|}||dddddd|jdS)Nrr=r>r?rr@rKrArs  rtest_configure_padyz(StandardOptionsTests.test_configure_padykrCr!cZ|}||ddS)Nrrrrs  rtest_configure_reliefz*StandardOptionsTests.test_configure_reliefprr!c^|}||ddddS)Nrr-rs  rtest_configure_repeatdelayz/StandardOptionsTests.test_configure_repeatdelayts/v}dC@@@@@r!c^|}||ddddS)NrrJrKr-rs  rtest_configure_repeatintervalz2StandardOptionsTests.test_configure_repeatintervalxs0v'7sCCCCCr!cZ|}||ddS)Nrrrs  rtest_configure_selectbackgroundz4StandardOptionsTests.test_configure_selectbackground|rr!cb|}||ddddddS)Nrrr
rrHrrs  r test_configure_selectborderwidthz5StandardOptionsTests.test_configure_selectborderwidths4f&93ROOOOOr!cZ|}||ddS)Nrrrs  rtest_configure_selectforegroundz4StandardOptionsTests.test_configure_selectforegroundrr!cZ|}||ddS)Nrrrs  rtest_configure_setgridz+StandardOptionsTests.test_configure_setgrid+vy11111r!c`|}||dddddS)Nstateactivedisablednormalrrs  rtest_configure_statez)StandardOptionsTests.test_configure_states1FGXz8LLLLLr!c`|}||dddddS)Nr01rFrrDrs  rtest_configure_takefocusz-StandardOptionsTests.test_configure_takefocuss1c3;;;;;r!c^|}||ddddS)NrrFz
any stringrars  rtest_configure_textz(StandardOptionsTests.test_configure_texts/\:::::r!c|}tj|j}||d|dS)Nr)rr/	StringVarrrrr4rs   rtest_configure_textvariablez0StandardOptionsTests.test_configure_textvariables?	**<<<<<r!cZ|}||ddS)Nrrrs  rtest_configure_troughcolorz/StandardOptionsTests.test_configure_troughcolor+V]33333r!c`|}||dddddS)NrrrT
r-rs  rtest_configure_underlinez-StandardOptionsTests.test_configure_underlines1v{Aq"=====r!c\|}||dddS)Nrr,rrs  rtest_configure_wraplengthz.StandardOptionsTests.test_configure_wraplengths-flC88888r!cZ|}||ddS)Nrrrnrs  rtest_configure_xscrollcommandz2StandardOptionsTests.test_configure_xscrollcommand,v'788888r!cZ|}||ddS)Nrrrrs  rtest_configure_yscrollcommandz2StandardOptionsTests.test_configure_yscrollcommandrtr!cZ|}||ddS)Nrlrrrs  rtest_configure_commandz+StandardOptionsTests.test_configure_commandrWr!cZ|}||ddS)Nindicatoronrrs  rtest_configure_indicatoronz/StandardOptionsTests.test_configure_indicatorons+v}55555r!cZ|}||ddS)N	offreliefrGrs  rtest_configure_offreliefz-StandardOptionsTests.test_configure_offreliefs+fk22222r!cZ|}||ddS)N
overreliefrGrs  rtest_configure_overreliefz.StandardOptionsTests.test_configure_overreliefs+fl33333r!cZ|}||ddS)Nselectcolorrrs  rtest_configure_selectcolorz/StandardOptionsTests.test_configure_selectcolorrkr!cZ|}||ddS)Nselectimager%rs  rtest_configure_selectimagez/StandardOptionsTests.test_configure_selectimagerkr!cZ|}||ddS)N
tristateimager%rs  rtest_configure_tristateimagez1StandardOptionsTests.test_configure_tristateimages+V_55555r!c\|}||dddS)N
tristatevalue
unknowable)rr7rs  rtest_configure_tristatevaluez1StandardOptionsTests.test_configure_tristatevalues+>>>>>r!c|}tj|j}||d|dS)Nvariable)rr/	DoubleVarrrrgs   rtest_configure_variablez,StandardOptionsTests.test_configure_variables?	**
C88888r!N)8rrrSTANDARD_OPTIONSrrrrrrrrrrrrrrr!r#r&r(r*r.r0r2r4r6r;rBrErHrLrNrPrRrTrVr]rbrdrhrjrnrprsrvrxr{r~rrrrrrrjr!rrrsF999999
999FFF
///888KKKDDD
000;;;:::@@@///<<<777000...999999
===<<<JJJ///111HHH
:::
:::
000AAADDD999PPP999222MMM<<<;;;===
444>>>999999999222666333444444444666???99999r!rceZdZdZdZdS)IntegerSizeTestsc`|}||dddddS)Nheightr,rr-rs  rtest_configure_heightz&IntegerSizeTests.test_configure_heights1vxdA>>>>>r!c`|}||dddddS)Nwidthnrr-rs  rtest_configure_widthz%IntegerSizeTests.test_configure_widths1vwT1=====r!Nrrrrrrjr!rrrs2???>>>>>r!rceZdZdZdZdS)PixelSizeTestsc
f|}||ddddddddS)Nrr,gLY@gfffffY@rr3crrs  rrz$PixelSizeTests.test_configure_heights7fhUE4DQQQQQr!c
f|}||ddddddddS)Nrrgfffff6y@gIy@rr5irrs  rrz#PixelSizeTests.test_configure_widths7fgsE5$4PPPPPr!Nrrjr!rrrs:RRRQQQQQr!rcfd}|S)Nc
jD]l}d|z}t|sUD]3}t||r!t|t||n 4|ffd	}||_t||mS)Ntest_configure_cp|}||td|dj)NzOption "z" is not tested in )rAssertionErrorr)roptionr4clss   rrz5add_standard_options.<locals>.decorator.<locals>.testsC!%v,n.4ffcll.DEEEr!)rhasattrsetattrgetattrr)rr
methodnamesource_classrsource_classess`    r	decoratorz'add_standard_options.<locals>.decoratorsk	3	3F*V3J3
++

3$233L|Z88Z 'j A ACCC
+1EEEEEE
%/DMCT222
r!rj)rrs` radd_standard_optionsrs$$r!ctjjr;tj}td|ddddSdS)Nzpatchlevel =info
patchlevelT)flush)rrrr/Tclrr)tcls rsetUpModulersP|Jkmm
nchhv|<<DIIIIIIJJr!)unittestr/tkinter.test.supportrrrrtest.supportrrr.rrrrrrrjr!r<module>rsW;;;;;;;;;;;;
FHH	D8D8D8D8D8D8D8D8NC9C9C9C9C9C9C9C9L>>>>>>>>QQQQQQQQ0JJJJJr!