a ze(@sddlZddlZddlmZddlZddlmZddlmZmZm Z m Z m Z ddl m Z mZmZmZmZmZmZmZedddZGd d d eeZe eGd d d eejZe eGd ddeejZe eGdddeejZGdddeeZe eGdddeejZe eGdddeejZe eGdddeejZe eGdddeejZe eGdddeejZ Gddde ejZ!e eeGdd d eejZ"e eGd!d"d"e"ejZ#e eGd#d$d$eejZ$e eeGd%d&d&eejZ%e eeGd'd(d(eejZ&e eeGd)d*d*eejZ'e eeGd+d,d,eejZ(e eGd-d.d.eejZ)e eGd/d0d0eejZ*e eeGd1d2d2eejZ+Gd3d4d4e ejZ,ee%ee"eeee&e e*e+e!e)ee'e(e#e$ee,fZ-e.d5kre/dS)6N)TclError)requires) tcl_version requires_tclget_tk_patchlevel widget_eqAbstractDefaultRootTest)add_standard_optionsnoconv pixels_roundAbstractWidgetTestStandardOptionsTestsIntegerSizeTestsPixelSizeTests setUpModuleZguicCs tt|SN)floatroundxrZ/opt/bitninja-python-dojo/embedded/lib/python3.9/tkinter/test/test_tkinter/test_widgets.py float_roundsrc@s0eZdZeZddZddZddZddZd S) AbstractToplevelTestcCsR|}||d|jj|j|dddd|jdd}||dddS)NclassZFooz2can't modify -class option after widget is createderrmsg)class_)create assertEqual __class____name__titlecheckInvalidParamselfwidgetwidget2rrrtest_configure_classs    z)AbstractToplevelTest.test_configure_classcCsJ|}||dd|j|dddd|jdd}||dddS)Ncolormapnewz5can't modify -colormap option after widget is createdr)r)rrr#r$rrrtest_configure_colormap"s  z,AbstractToplevelTest.test_configure_colormapcCs^|}||d|jrdnd|j|dddd|jdd}||d|jrTdnd dS) N containerr0z6can't modify -container option after widget is createdrTr.1)rr wantobjectsr#r$rrrtest_configure_container*s  z-AbstractToplevelTest.test_configure_containercCsJ|}||dd|j|dddd|jdd}||dddS)Nvisualr*defaultz3can't modify -visual option after widget is createdr)r5r,r$rrrtest_configure_visual2s  z*AbstractToplevelTest.test_configure_visualN) r! __module__ __qualname__r _conv_pad_pixelsr(r-r4r7rrrrrs  rc@s0eZdZdZddZddZddZdd Zd S) ToplevelTest) background borderwidthrr)r.cursorheighthighlightbackgroundhighlightcolorhighlightthicknessmenupadxpadyreliefscreen takefocususer5widthcKstj|jfi|Sr)tkinterZToplevelrootr%kwargsrrrrEszToplevelTest.createcCs8|}t|j}|j|d|td||dddS)NrCeqr*)rrKMenurL checkParamrr%r&rCrrrtest_configure_menuHs z ToplevelTest.test_configure_menucCsv|}||ddztjd}WntyB|dYn0|j|d|dd|j|d}||d|dS)NrGr*ZDISPLAYzNo $DISPLAY set.z3can't modify -screen option after widget is createdr)rG)rrosenvironKeyErrorZskipTestr#)r%r&Zdisplayr'rrrtest_configure_screenNs   z"ToplevelTest.test_configure_screencCs||}||dd|jdd}t|}|j|d,|j|d}||d|Wdn1sn0YdS)NrIr*Tr1)wid)rI)rrhexZwinfo_idZsubTest)r%r&parentrYr'rrrtest_configure_useZs   zToplevelTest.test_configure_useN)r!r8r9OPTIONSrrTrXr\rrrrr;;s  r;c@seZdZdZddZdS) FrameTest)r<r=rr)r.r>r?r@rArBrDrErFrHr5rJcKstj|jfi|Sr)rKFramerLrMrrrrmszFrameTest.createNr!r8r9r]rrrrrr^dsr^c@s(eZdZdZddZddZddZdS) LabelFrameTest)r<r=rr)r.r>font foregroundr?r@rArB labelanchor labelwidgetrDrErFrHtextr5rJcKstj|jfi|Sr)rKZ LabelFramerLrMrrrr|szLabelFrameTest.createcCs>|}||ddddddddd d d d d ||dddS)NrdeenesnnenwsseswwZwnwscenter)rcheckEnumParamr#r%r&rrrtest_configure_labelanchors   z)LabelFrameTest.test_configure_labelanchorcCs8|}tj|jddd}|j|d|dd|dS)NZMuppfoo)rfnamerez.fooexpected)rrKLabelrLrRdestroy)r%r&labelrrrtest_configure_labelwidgetsz)LabelFrameTest.test_configure_labelwidgetN)r!r8r9r]rrur}rrrrraqs rac@seZdZeZddZdS)AbstractLabelTestc Cs$|}||ddddddddS)NrBr?@10prcheckPixelsParamrtrrr!test_configure_highlightthicknesss z3AbstractLabelTest.test_configure_highlightthicknessN)r!r8r9r _conv_pixelsrrrrrr~sr~c@seZdZdZddZdS) LabelTest)activebackgroundactiveforegroundanchorr<bitmapr=compoundr>disabledforegroundrbrcr?r@rArBimagejustifyrDrErFstaterHrf textvariable underlinerJ wraplengthcKstj|jfi|Sr)rKrzrLrMrrrrszLabelTest.createNr`rrrrrs rc@s eZdZdZddZddZdS) ButtonTest) rrrr<rr=commandrr>r6rrbrcr?r@rArBrr overreliefrDrErF repeatdelayrepeatintervalrrHrfrrrJrcKstj|jfi|Sr)rKButtonrLrMrrrrszButtonTest.createcCs|}||dddddS)Nr6Zactivedisablednormalrrsrtrrrtest_configure_defaultsz!ButtonTest.test_configure_defaultN)r!r8r9r]rrrrrrrs rc@s(eZdZdZddZddZddZdS) CheckbuttonTest)&rrrr<rr=rrr>rrbrcr?r@rArBr indicatoronr offreliefoffvalueonvaluerrDrErF selectcolor selectimagerrHrfr tristateimage tristatevaluervariablerJrcKstj|jfi|Sr)rKZ CheckbuttonrLrMrrrrszCheckbuttonTest.createcCs |}||ddddddS)Nrr0ffffff@r* any stringr checkParamsrtrrrtest_configure_offvaluesz'CheckbuttonTest.test_configure_offvaluecCs |}||ddddddS)Nrr0rr*rrrtrrrtest_configure_onvaluesz&CheckbuttonTest.test_configure_onvalueN)r!r8r9r]rrrrrrrrsrc@s eZdZdZddZddZdS)RadiobuttonTest)%rrrr<rr=rrr>rrbrcr?r@rArBrrrrrrDrErFrrrrHrfrrrrvaluerrJrcKstj|jfi|Sr)rKZ RadiobuttonrLrMrrrrszRadiobuttonTest.createcCs |}||ddddddS)Nrr0rr*rrrtrrrtest_configure_valuesz$RadiobuttonTest.test_configure_valueN)r!r8r9r]rrrrrrrs rc@s^eZdZdZeeZddZddZddZ e j Z dd Z d d Z d d ZddZddZdS)MenubuttonTest)rrrr<rr=rr> directionrrbrcr?r@rArBrrrrCrDrErFrrHrfrrrJrcKstj|jfi|Sr)rKZ MenubuttonrLrMrrrrszMenubuttonTest.createc Cs"|}||dddddddS)NrZaboveZbelowflushleftrightrrtrrrtest_configure_directions z'MenubuttonTest.test_configure_directioncCs"|}|j|ddddtddS)Nr?drconvrcheckIntegerParamstrrtrrrtest_configure_heightsz$MenubuttonTest.test_configure_heightcCs|}tj|jdd}|j|d|tdd}|tj}d|d<Wdn1sX0Y|dur||t|j ||tj}| ddiWdn1s0Y|dur|t|j |dS)NZimage1)Zmasterrwrrzimage "spam" doesn't existspam) rrKZ PhotoImagerLrRr assertRaisesrr exceptionZ configure)r%r&rrcmrrrtest_configure_image s&,z#MenubuttonTest.test_configure_imagecCs4|}tj|dd}|j|d|td|dS)NrC)rwrO)rrKrQrRrr{rSrrrrTsz"MenubuttonTest.test_configure_menucCs2|}||ddddd|j|dddddS) NrD皙@ffffff@12mrrrxrrrRrtrrrtest_configure_padx!sz"MenubuttonTest.test_configure_padxcCs2|}||ddddd|j|dddddS) NrErrrrrrrxrrtrrrtest_configure_pady&sz"MenubuttonTest.test_configure_padycCs"|}|j|ddddtddS)NrJnrrrrtrrrtest_configure_width+sz#MenubuttonTest.test_configure_widthN)r!r8r9r] staticmethodr rrrrr rrrTrrrrrrrrs rc@seZdZdddZddZdS) OptionMenuTestbarccKstj|jd|g|Ri|Sr)rK OptionMenurL)r%r6valuesrNrrrr2szOptionMenuTest.createcCsD|td$tj|jddddWdn1s60YdS)Nz^unknown option -image$rr*)r)assertRaisesRegexrrKrrLr%rrrtest_bad_kwarg5szOptionMenuTest.test_bad_kwargN)rr)r!r8r9rrrrrrr0s rc@sheZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZdS) EntryTest)r<r=r>disabledbackgroundrexportselectionrbrcr@rArBinsertbackgroundinsertborderwidth insertofftime insertontime insertwidthinvalidcommandrreadonlybackgroundrFselectbackgroundselectborderwidthselectforegroundshowrrHrvalidatevalidatecommandrJxscrollcommandcKstj|jfi|Sr)rKZEntryrLrMrrrrIszEntryTest.createcCs|}||ddS)NrrZcheckColorParamrtrrr!test_configure_disabledbackgroundLsz+EntryTest.test_configure_disabledbackgroundc Cs:|jdd}||ddddddd |j|dd d d dS) Nr)rrrrrrrr<2rxrrtrrr test_configure_insertborderwidthPs   z*EntryTest.test_configure_insertborderwidthcCst|}||dddd|j|dddd|j|ddddtd d kr^|j|dd ddn|j|dd d ddS) Nrr @rg?rxrg?rr0)rrrRr rtrrrtest_configure_insertwidthWs z$EntryTest.test_configure_insertwidthcCs$|}||d||ddS)NrZinvcmdrZcheckCommandParamrtrrrtest_configure_invalidcommandas z'EntryTest.test_configure_invalidcommandcCs|}||ddS)Nrrrtrrr!test_configure_readonlybackgroundfsz+EntryTest.test_configure_readonlybackgroundcCs6|}||dd||dd||dddS)Nr*r* rrRrtrrrtest_configure_showjszEntryTest.test_configure_showcCs|}||dddddS)Nrrrreadonlyrrtrrrtest_configure_statepszEntryTest.test_configure_statec Cs$|}||ddddddddS)NrallkeyZfocusZfocusinZfocusoutnonerrtrrrtest_configure_validateus z!EntryTest.test_configure_validatecCs$|}||d||ddS)NrZvcmdrrtrrrtest_configure_validatecommandzs z(EntryTest.test_configure_validatecommandcCs$|}|dd|||dd||d|||d| d||d|dd||d | |||dd| d||d | d||d | d ||d | d||d| ddSNrZ12345endr0r2r4Z1234Z234Z2345 rinsertZ assertFalseZselection_presentZselection_rangerZ selection_getZ assertTrueZselection_fromZ selection_toselection_clearZselection_adjustrtrrrtest_selection_methodss.          z EntryTest.test_selection_methodsN)r!r8r9r]rrrrrrrrrrr rrrrr:s  rc@seZdZdZddZdZddZddZd d Zd d Z d dZ ddZ ddZ ddZ ddZddZddZddZddZdS) SpinboxTest),rr<r=buttonbackground buttoncursorbuttondownreliefbuttonupreliefrr>rrrrbrcformatfromr@rArB incrementrrrrrrrrFrrrrrrrrHrtorrrrJwraprcKstj|jfi|Sr)rKZSpinboxrLrMrrrrszSpinboxTest.createNcCs|}||ddS)Nr rrtrrrtest_configure_buttonbackgroundsz+SpinboxTest.test_configure_buttonbackgroundcCs|}||ddS)Nr rZcheckCursorParamrtrrrtest_configure_buttoncursorsz'SpinboxTest.test_configure_buttoncursorcCs|}||ddS)NrrZcheckReliefParamrtrrrtest_configure_buttondownreliefsz+SpinboxTest.test_configure_buttondownreliefcCs|}||ddS)Nrrrtrrrtest_configure_buttonupreliefsz)SpinboxTest.test_configure_buttonupreliefcCs|}||dd||dd||dd||dd||dd||dd||dd||dd ||dd ||dd ||dd ||dd dS)Nrz%2fz%2.2fz%.2fz%2.fz%2e-1fz2.2z%2.-2fz%-2.02fz% 2.02fz % -2.200fz%09.200fz%drrRr#rtrrrtest_configure_formatsz!SpinboxTest.test_configure_formatcCs>|}||dd||dddd|j|dddd dS) NrgY@rffffff$@ffffff'@*-to value must be greater than -from valuerrrRcheckFloatParamr#rtrrrtest_configure_froms  zSpinboxTest.test_configure_fromc Cs"|}||dddddddS)Nrr0rg)@rrr#rtrrrtest_configure_incrementsz$SpinboxTest.test_configure_incrementcCs>|}||dd||dddd|j|dddd dS) NrgYrrrri8r!rr"rtrrrtest_configure_tos  zSpinboxTest.test_configure_tocCs\|}||dd||dd|j|dddd|j|dddd||dddS)Nrr*zmon tue wed thur)ZmonZtueZwedZthurrx)*gQ @r*rz42 3.14 {} {any string})rrrRrtrrrtest_configure_valuess  z!SpinboxTest.test_configure_valuescCs|}||ddS)NrrZcheckBooleanParamrtrrrtest_configure_wrapszSpinboxTest.test_configure_wrapcCs`|}||d|tj|jd|tj|jd|t|j|t|jdddS)Nrnoindexr0)rassertIsBoundingBoxbboxrrKr TypeErrorrtrrr test_bboxs zSpinboxTest.test_bboxcCs|}|dd|||dd||d|||d| d||d|dd||d | |||dd| d||d | d||d | d ||d | d||ddSrrrtrrrr s,          z"SpinboxTest.test_selection_methodscCsP|}||d|d||d|d||ddS)NrZbuttonupZ buttondown)rrZselection_elementrtrrrtest_selection_elements   z"SpinboxTest.test_selection_element)r!r8r9r]rrrrrrrr$r'r(r*r,r1r r2rrrrr s  r c@seZdZdZedkrdZddZddZedd d d Z edd d d Z ddZ ddZ edd ddZ eddddZddZddZddZddZedd dd Zd!d"Zd#d$Zedd d%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/S)0TextTest))autoseparatorsr< blockcursorr=r>endlinerrbrcr?r@rArBinactiveselectbackgroundrrrrinsertunfocussedrmaxundorDrErFrrrsetgridspacing1spacing2spacing3 startlinertabstabstylerHundorJrryscrollcommandrTcKstj|jfi|Sr)rKTextrLrMrrrr,szTextTest.createcCs|}||ddS)Nr4r+rtrrrtest_configure_autoseparators/sz&TextTest.test_configure_autoseparatorsrDrcCs|}||ddS)Nr5r+rtrrrtest_configure_blockcursor3sz#TextTest.test_configure_blockcursorcCs|}dddtdD}|d||j|dddd |j|dd dd |j|dd d d ||dd||dd|j|dddd dS)N css|] }dVqdSzLine %dNr.0irrr ;z2TextTest.test_configure_endline..rrr6r r*rxrrexpected integer but got "spam"rrr> 1-startline must be less than or equal to -endlinerjoinrangerrRr#r%r&rfrrrtest_configure_endline8s   zTextTest.test_configure_endlinecCsD|}||ddddd|j|dddd|j|dd dddS) Nr?rLY@fffffY@Z3crr0rxrrrtrrrrFszTextTest.test_configure_heightcCs|}||dddddS)Nr9rrr%rrrtrrrtest_configure_maxundoLszTextTest.test_configure_maxundocCs|}||ddS)Nr7rrtrrr'test_configure_inactiveselectbackgroundPsz0TextTest.test_configure_inactiveselectbackgroundrcCs|}||dddddS)Nr8ZhollowrZsolidrrtrrrtest_configure_insertunfocussedUsz(TextTest.test_configure_insertunfocussedc Cs*|}|j|dddddttdkddS)NrrrrrrC)r keep_orig)rrr rrtrrr test_configure_selectborderwidth[s  z)TextTest.test_configure_selectborderwidthcCs2|}||ddddd|j|dddddS) Nr;ffffff5@皙6@0.5crrxrrtrrrtest_configure_spacing1asz TextTest.test_configure_spacing1cCs2|}||ddddd|j|dddddS) Nr<r皙@ffffff@z0.1cr%rrxrrtrrrtest_configure_spacing2fsz TextTest.test_configure_spacing2cCs2|}||ddddd|j|dddddS) Nr=r`rarbrcrrrxrrtrrrtest_configure_spacing3ksz TextTest.test_configure_spacing3cCs|}dddtdD}|d||j|dddd |j|dd dd |j|dd d d ||dd||dd|j|dddd dS)NrHcss|] }dVqdSrIrrJrrrrMsrNz4TextTest.test_configure_startline..rrr>r r*rxrrrOrrQr6rFrRrSrVrrrtest_configure_startlineps   z!TextTest.test_configure_startlinecCs6|}tdkr"||dddn||ddddS)NrCrrrrrrrsrtrrrr~szTextTest.test_configure_statecCst|}tdkr&|j|ddddn||dd|j|dddd|j|dddd|j|dd d td kd dS) NrDr r?)rg333334@1i2i)z10.2z20.7rorprxz10.2 20.7 1i 2iz2c left 4c 6c center)Z2crZ4cZ6crrrzbad screen distance "spam"rC)rr^)rrrRr#rrtrrrtest_configure_tabss      zTextTest.test_configure_tabscCs|}||ddddS)Nr@ZtabularZ wordprocessorrrtrrrtest_configure_tabstylesz TextTest.test_configure_tabstylecCs|}||ddS)NrAr+rtrrrtest_configure_undoszTextTest.test_configure_undocCs>|}||dd|j|dddd|j|dddddS)NrJrrr0rxr)rrrRrtrrrrszTextTest.test_configure_widthcCs:|}tdkr$||ddddn||dddddS)NrCrcharrZwordrlrtrrrr,szTextTest.test_configure_wrapcCsp|}||d||d|tj|jd|tj|jd|t|j|t|jdddS)Nz1.1rr-)rr.r/ assertIsNonerrKrr0rtrrrr1szTextTest.test_bboxN)r!r8r9r]r _stringifyrrFrrGrWrr[r\r]r_rerhrirkrrqrrrsrr,r1rrrrr3s:       r3c@sjeZdZdZeZdZddZddZddZ d d Z d d Z d dZ ddZ ddZeddddZdS) CanvasTest)r<r= closeenoughconfiner>r?r@rArBrrrrroffsetrF scrollregionrrrrrHrxscrollincrementrByscrollincrementrJTcKstj|jfi|Sr)rKZCanvasrLrMrrrrszCanvasTest.createc Cs$|}|j|dddddtddS)Nrx333333@rr)rr#rrtrrrtest_configure_closeenoughsz%CanvasTest.test_configure_closeenoughcCs|}||ddS)Nryr+rtrrrtest_configure_confinesz!CanvasTest.test_configure_confinec Csd|}||dd||dddddddd d d ||dd ||dd ||dddS)Nrzz0,0rjrkrgrnrmrorprlrrz10,20z#5,6r)rrrrRr#rtrrrtest_configure_offsetsz CanvasTest.test_configure_offsetcCsv|}||dd|j|dddd||dd|j|dddd||dd ||dd ||dd dS) Nr{z 0 0 200 150)rrr rxr*rzbad scrollRegion "spam"r)rrr r)rrr )rrr rrrrtrrrtest_configure_scrollregions  z&CanvasTest.test_configure_scrollregioncCs |}|j|ddddddS)Nrrrz0bad state value "{}": must be normal or disabledrrrtrrrrs zCanvasTest.test_configure_statec Cs$|}||ddddddddS)Nr|(rgD@gE@iz0.5irrtrrrtest_configure_xscrollincrements z*CanvasTest.test_configure_xscrollincrementc Cs$|}||ddddddddS)Nr}rQrffffff&@g333333+@rz0.1irrtrrrtest_configure_yscrollincrements z*CanvasTest.test_configure_yscrollincrementrDrcCsH|}|jdddddd}|jdddddd}||\}}}}||\}}}}|ddd ||\} } }}||\} } }}|| d|| d |||| | |||| | ||||jddd ||\} }}}||\}}}}||d||| || | || || | ||dS) Nr0r`group)tagsrrjr r)y)rZcreate_rectangler/ZmovetorZ tag_lower)r%r&Zi1Zi2Zx1Zy1_Zx2Zy2Zx1_2Zy1_2Zx2_2Zy2_2Zx1_3Zy1_3Zx2_3Zy2_3rrr test_movetos(     zCanvasTest.test_movetoN)r!r8r9r]rrrvrrrrrrrrrrrrrrrws   rwc@seZdZdZddZddZedddejZ d d Z d d Z d dZ ddZ ddZddZddZddZddZddZddZdd Zd!d"Zd#d$Zd%S)& ListboxTest) activestyler<r=r>rrrbrcr?r@rArBr listvariablerFrrr selectmoder:rrHrJrrBcKstj|jfi|Sr)rKZListboxrLrMrrrrszListboxTest.createcCs|}||dddddS)NrZdotboxrrrrtrrrtest_configure_activestylesz&ListboxTest.test_configure_activestylerDrrcCs&|}t|j}||d|dS)Nr)rrKZ DoubleVarrLZcheckVariableParam)r%r&varrrrtest_configure_listvariable%s z'ListboxTest.test_configure_listvariablecCsD|}||dd||dd||dd||dddS)NrZsingleZbrowseZmultipleZextendedrrtrrrtest_configure_selectmode*s z%ListboxTest.test_configure_selectmodecCs|}||ddddS)Nrrrrrtrrrr1sz ListboxTest.test_configure_statecCs|}|td|dWdn1s40Yd}|jdg|Rt|D]\}}|j||dq`|t|Wdn1s0Y|td|dWdn1s0Y| |ddd | |ddd | |d dd |d}| |t | D]T\}}| t|d t|d kr:| ||d|| |d|d|q:dS)Nzitem number "0" out of rangerz)red orange yellow green blue white violetr)r<zbad listbox index "red"redr<)r<r< Backgroundr*r)r<r<rr*Zvioletz@0,0)rrrr)rrr itemconfiguresplitr enumeraterr0rassertIsInstancedictitemsZassertInlenitemcget)r%r&ZcolorsrLZcolordkvrrrtest_itemconfigure5s6( &(  zListboxTest.test_itemconfigurecCs|}|ddddd|jd i||i||d|d|||d|||td$|jd i|d iWdn1s0YdS) Nrrrrrrrzunknown color name "spam"r)r)r)rrrrrrr)r%rwrr&rrrcheck_itemconfigurePszListboxTest.check_itemconfigurecCs|dddS)Nr<#ff0000rrrrrtest_itemconfigure_backgroundYsz)ListboxTest.test_itemconfigure_backgroundcCs|dddS)Nbgrrrrrrtest_itemconfigure_bg\sz!ListboxTest.test_itemconfigure_bgcCs|dddS)NZfg#110022rrrrrtest_itemconfigure_fg_sz!ListboxTest.test_itemconfigure_fgcCs|dddS)Nrcrrrrrrtest_itemconfigure_foregroundbsz)ListboxTest.test_itemconfigure_foregroundcCs|dddS)Nrrrrrrr#test_itemconfigure_selectbackgroundesz/ListboxTest.test_itemconfigure_selectbackgroundcCs|dddS)Nrz#654321rrrrr#test_itemconfigure_selectforegroundhsz/ListboxTest.test_itemconfigure_selectforegroundcCs|}|jdgddtdDR|||d||d||d|t|jd|t|jd|t |j|t |jdddS) Nrcss|]}d|VqdSzel%dNrrJrrrrMmrNz'ListboxTest.test_box..rDr%rQr-r0) rrrUpackr.r/rurrr0r%Zlbrrrtest_boxks zListboxTest.test_boxcCsp|}|jdgddtdDR|dtj|dd|d||d| t |jddS) Nrcss|]}d|VqdSrrrJrrrrMyrNz0ListboxTest.test_curselection..rDrrr)rrrr) rrrUr rKZENDZ selection_setrZ curselectionrr0rrrrtest_curselectionws   zListboxTest.test_curselectioncCs:|}|jdgddtdDR||dd||dd||dd ||dd ||d d ||dd d ||d dd||d dd||ddd|t|jd|t|jd|t|j|t|jdd|t|jddd|t|jddS)Nrcss|]}d|VqdSrrrJrrrrMrNz'ListboxTest.test_get..rDel0rel3rel7r*r%r)rZel4el5)rZel6rr)rr-r0rr)rrrUrgetrrr0rrrrtest_gets" zListboxTest.test_getN)r!r8r9r]rrrr Ztest_configure_justifyZ test_justifyrrrrrrrrrrrrrrrrrrrs$    rc@steZdZdZdZddZddZddZd d Zd d Z d dZ ddZ ddZ ddZ ddZddZddZdS) ScaleTest)rr< bigincrementr=rr>digitsrbrcrr@rArBr|lengthorientrFrr resolution showvalue sliderlength sliderreliefrrH tickintervalr troughcolorrrJverticalcKstj|jfi|Sr)rKZScalerLrMrrrrszScaleTest.createcCs|}||dddddS)Nrg(@g7@rdr&rtrrrtest_configure_bigincrementsz%ScaleTest.test_configure_bigincrementcCs|}||ddddS)NrrrrZrtrrrtest_configure_digitsszScaleTest.test_configure_digitscCs4|}tdkrdnt}|j|dddd|ddS)N)rDrrQFrr-@333333.@r)rrrr#)r%r&rrrrr$szScaleTest.test_configure_fromcCs(|}||dd||dddS)Nr|rr*rrtrrrtest_configure_labelszScaleTest.test_configure_labelcCs |}||ddddddS)Nrgffffff`@g33333`@5irrtrrrtest_configure_lengthszScaleTest.test_configure_lengthcCs |}||ddddddS)Nrg@rg@rr&rtrrrtest_configure_resolutionsz#ScaleTest.test_configure_resolutioncCs|}||ddS)Nrr+rtrrrtest_configure_showvaluesz"ScaleTest.test_configure_showvaluec Cs"|}||dddddddS)NrrQr333333/@rZ3mrrtrrrtest_configure_sliderlengths z%ScaleTest.test_configure_sliderlengthcCs|}||ddS)Nrrrtrrrtest_configure_sliderreliefsz%ScaleTest.test_configure_sliderreliefc Cs8|}|j|dddddtd|j|dddtd dS) Nrr0333333@rgrrrr)ryr)rr#rrRrtrrrtest_configure_tickintervals z%ScaleTest.test_configure_tickintervalc Cs$|}|j|dddddtddS)Nri,rrrr)rr#rrtrrrr(szScaleTest.test_configure_toN)r!r8r9r]default_orientrrrr$rrrrrrrr(rrrrrs rc@sLeZdZdZeZdZdZddZddZ dd Z d d Z d d Z ddZ dS) ScrollbarTest)r activereliefr<r=rr>elementborderwidthr@rArBZjumprrFrrrHrrJTrcKstj|jfi|Sr)rKZ ScrollbarrLrMrrrrszScrollbarTest.createcCs|}||ddS)Nrrrtrrrtest_configure_activereliefsz)ScrollbarTest.test_configure_activereliefcCs |}||ddddddS)Nrrrr1mrrtrrr!test_configure_elementborderwidthsz/ScrollbarTest.test_configure_elementborderwidthcCs |}|j|ddddddS)Nrr horizontalz4bad orientation "{}": must be vertical or horizontalrrrtrrrtest_configure_orients z#ScrollbarTest.test_configure_orientcCsZ|}dD]}|||||q |d|||t|jdddS)N)arrow1Zsliderarrow2r*rr)rZactivaterrurr0)r%sbrgrrr test_activates  zScrollbarTest.test_activatecCs|}|dd||d|t|jdd|t|jdd|t|jdd|t|jd|t|jddddS) N皙?皙?)rrabcdefg333333?gffffff?g?)rsetrrrrr0)r%rrrrtest_sets zScrollbarTest.test_setN)r!r8r9r]rrrvrrrrrrrrrrrrs  rc@s.eZdZdZdZddZddZddZd d Zd d Z e d ddddZ e d ddddZ e d ddddZ ddZddZddZddZddZd d!Zd"d#Zd$d%Zd@d'd(Zd)d*Zd+d,Zd-d.Zd/d0Ze d dd1d2Zd3d4Zd5d6Zd7d8Zd9d:Ze d dd;d<Z d=d>Z!d?S)APanedWindowTest)r<r=r> handlepad handlesizer? opaqueresizerproxybackgroundproxyborderwidth proxyreliefrF sashcursorsashpad sashrelief sashwidth showhandlerJrcKstj|jfi|Sr)rKZ PanedWindowrLrMrrrrszPanedWindowTest.createc Cs"|}||dddddddS)Nrrrfrgrrrrtrrrtest_configure_handlepadsz(PanedWindowTest.test_configure_handlepadc Cs&|}|j|ddddddtddS)NrrDg"@g333333%@r2mrrrr rtrrrtest_configure_handlesizesz)PanedWindowTest.test_configure_handlesizec Cs(|}|j|dddddddtd dS) Nr?rrXrYrrrorrrtrrrr$sz%PanedWindowTest.test_configure_heightcCs|}||ddS)Nrr+rtrrrtest_configure_opaqueresize)sz+PanedWindowTest.test_configure_opaqueresizerDrrcCs|}||ddS)Nrrrtrrrtest_configure_proxybackground-sz.PanedWindowTest.test_configure_proxybackgroundc Cs(|}|j|dddddddtd dS) Nrrrg333333@rrrrrrtrrrtest_configure_proxyborderwidth2s  z/PanedWindowTest.test_configure_proxyborderwidthcCs|}||ddS)Nrrrtrrrtest_configure_proxyrelief9sz*PanedWindowTest.test_configure_proxyreliefcCs|}||ddS)Nrrrtrrrtest_configure_sashcursor>sz)PanedWindowTest.test_configure_sashcursorc Cs"|}||dddddddS)NrrDrrrrrrtrrrtest_configure_sashpadBsz&PanedWindowTest.test_configure_sashpadcCs|}||ddS)Nrrrtrrrtest_configure_sashreliefFsz)PanedWindowTest.test_configure_sashreliefc Cs&|}|j|ddddddtddS)NrrQg333333&@rrrrrrtrrrtest_configure_sashwidthJsz(PanedWindowTest.test_configure_sashwidthcCs|}||ddS)Nrr+rtrrrtest_configure_showhandleOsz)PanedWindowTest.test_configure_showhandlec Cs(|}|j|dddddddtd dS) NrJrgfffff6y@gIy@rrrrrrtrrrrSsz$PanedWindowTest.test_configure_widthcCs:|}t|}t|}|||||||fSr)rrKraddr%prrrrrcreate2Xs     zPanedWindowTest.create2cCs|\}}}|t|j||}||t|D]D\}}|t|d|||||||d| ||q:dS)Nrr) rrr0 paneconfigurerrrrrpanecget)r%rrrrrrrrrtest_paneconfigure`s  z"PanedWindowTest.test_paneconfigureFcCsvdd}|jr|rt|}|jr(|r(t}|j|fi||i|||||d|||||||dS)NcSs|SrrrrrrkrNz5PanedWindowTest.check_paneconfigure..r)r3rrrr)r%rrrwrry stringifyrrrrcheck_paneconfigurejs  z#PanedWindowTest.check_paneconfigurecCsF|t|&|j|fi|diWdn1s80YdS)NZbadValue)rrr)r%rrrwmsgrrrcheck_paneconfigure_badtsz'PanedWindowTest.check_paneconfigure_badcCs8|\}}}|||d|t||||dddS)NZafterbad window path name "badValue"rr rrrrrrtest_paneconfigure_afterxs  z(PanedWindowTest.test_paneconfigure_aftercCs8|\}}}|||d|t||||dddS)Nbeforerrrrrrtest_paneconfigure_before~s  z)PanedWindowTest.test_paneconfigure_beforecCs>|\}}}|j||dddtdkd|||dddS)Nr?rQrmr bad screen distance "badValue"rr rrrrrrtest_paneconfigure_heights z)PanedWindowTest.test_paneconfigure_heightcCs4|\}}}|||ddd|||dddS)NhideFrz)expected boolean value but got "badValue"rr rrrrrtest_paneconfigure_hides  z'PanedWindowTest.test_paneconfigure_hidecCs4|\}}}|||ddd|||dddS)NZminsizerQrrrrrrtest_paneconfigure_minsizes  z*PanedWindowTest.test_paneconfigure_minsizecCs4|\}}}|||ddd|||dddS)NrDrr0rrrrrrtest_paneconfigure_padxs  z'PanedWindowTest.test_paneconfigure_padxcCs4|\}}}|||ddd|||dddS)NrErr0rrrrrrtest_paneconfigure_padys  z'PanedWindowTest.test_paneconfigure_padycCs4|\}}}|||ddd|||dddS)NZstickyZnsewZneswz[bad stickyness value "badValue": must be a string containing zero or more of n, e, s, and wrrrrrtest_paneconfigure_stickys  z)PanedWindowTest.test_paneconfigure_stickycCs4|\}}}|||ddd|||dddS)NZstretchZalwalwayszEbad stretch "badValue": must be always, first, last, middle, or neverrrrrrtest_paneconfigure_stretchs  z*PanedWindowTest.test_paneconfigure_stretchcCs>|\}}}|j||dddtdkd|||dddS)NrJrQrmrrrrrrrtest_paneconfigure_widths z(PanedWindowTest.test_paneconfigure_widthN)F)"r!r8r9r]rrrrrrrrrrrrrrrrrr r rrrrrrrrrr r!rrrrr sF          rc@s\eZdZdZeZddZddZddZdd Z d d Z d d Z ddZ ddZ ddZdS)MenuTest)rZactiveborderwidthrr<r=r>rrbrc postcommandrFrrHtearofftearoffcommandr"typecKstj|jfi|Sr)rKrQrLrMrrrrszMenuTest.createcCs|}||ddS)Nr#rrtrrrtest_configure_postcommandsz#MenuTest.test_configure_postcommandcCs|}||ddS)Nr$r+rtrrrtest_configure_tearoffszMenuTest.test_configure_tearoffcCs|}||ddS)Nr%rrtrrrtest_configure_tearoffcommandsz&MenuTest.test_configure_tearoffcommandcCs|}||dddS)Nr"rrrtrrrtest_configure_titleszMenuTest.test_configure_titlecCs"|}|j|dddddddS)Nr&rr$Zmenubarz2bad type "{}": must be normal, tearoff, or menubarrrrtrrrtest_configure_types zMenuTest.test_configure_typecCs|}|jdd|t|j|td|dWdn1sN0Y|d}||t| D]X\}}||t ||t | t |d| |d|| |d||dqv|dS) Ntestr|zbad menu entry index "foo"rvr0rrr)r add_commandrr0entryconfigurerrrrrrtuplerr entrycgetr{)r%m1rrrrrrtest_entryconfigures (    zMenuTest.test_entryconfigurecCsN|}|jdd||ddd|jddd||ddddS)Nr,r-r0r|changed)rr.rr1r/)r%r2rrrtest_entryconfigure_labels  z"MenuTest.test_entryconfigure_labelcCs||}t|j}t|j}|j|dddd|t|ddt||jd|d|t|ddt|dS)NTFZNonsense)rrrr|r0r)r) rrKZ BooleanVarrLZadd_checkbuttonrrr1r/)r%r2Zv1Zv2rrrtest_entryconfigure_variables   z%MenuTest.test_entryconfigure_variableN)r!r8r9r]r rrr'r(r)r*r+r3r5r6rrrrr"sr"c@s$eZdZdZeZddZddZdS) MessageTest)raspectr<r=r>rbrcr@rArBrrDrErFrHrfrrJcKstj|jfi|Sr)rKZMessagerLrMrrrrszMessageTest.createcCs|}||dddddS)Nr8rirZrtrrrtest_configure_aspectsz!MessageTest.test_configure_aspectN)r!r8r9r]r r:rr:rrrrr7sr7c@seZdZddZddZdS)DefaultRootTestcCs|tjdSr) _test_widgetrKr_rrrr test_frameszDefaultRootTest.test_framecCs|tjdSr)r<rKrzrrrr test_labelszDefaultRootTest.test_labelN)r!r8r9r=r>rrrrr;sr;__main__)0ZunittestrKrrUZ test.supportrZtkinter.test.supportrrrrrZtkinter.test.widget_testsr r r r r rrrrrZTestCaser;r^rar~rrrrrrrr r3rwrrrrr"r7r;Z tests_guir!mainrrrrsx  (%(  @ ^YC21G