{G_Tc@sTddlZddlZddlmZddlZddlZddlmZmZddlm Z m Z m Z m Z ddl mZmZmZmZmZmZmZmZmZmZeddeefdYZeed eejfd YZeed eejfd YZeed eejfdYZdeefdYZeedeejfdYZeedeejfdYZeedeejfdYZ eedeejfdYZ!eedeejfdYZ"de"ejfdYZ#eeedeejfdYZ$eede$ejfd YZ%eed!eejfd"YZ&eeed#eejfd$YZ'eeed%eejfd&YZ(eeed'eejfd(YZ)eeed)eejfd*YZ*eed+eejfd,YZ+eed-eejfd.YZ,eeed/eejfd0YZ-ee'e e$eeee(e"e,e-e#e+e!e)e*e%e&egZ.e/d1krPee.ndS(2iN(tTclError(trequirest run_unittest(t tcl_versiont requires_tcltget_tk_patchlevelt widget_eq( tadd_standard_optionstnoconvt noconv_metht int_roundt pixels_roundtAbstractWidgetTesttStandardOptionsTeststIntegerSizeTeststPixelSizeTestst setUpModuletguitAbstractToplevelTestcBs2eZeZdZdZdZdZRS(cCso|j}|j|d|jjj|j|dddd|jdd}|j|dddS(NtclasstFooterrmsgs2can't modify -class option after widget is createdtclass_(tcreatet assertEqualt __class__t__name__ttitletcheckInvalidParam(tselftwidgettwidget2((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_classs  cCsc|j}|j|dd|j|dddd|jdd}|j|dddS(NtcolormapttnewRs5can't modify -colormap option after widget is created(RRR(RRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_colormaps  cCs|j}|j|d|jr(dnd|j|dddd|jdt}|j|d|jrvdnddS(Nt containerit0iRs6can't modify -container option after widget is createdt1(RRt wantobjectsRtTrue(RRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_container's  #cCsc|j}|j|dd|j|dddd|jdd}|j|dddS(NtvisualR"tdefaultRs3can't modify -visual option after widget is created(RRR(RRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_visual/s  (Rt __module__R t_conv_pad_pixelsR R$R*R-(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs   t ToplevelTestcBs2eZdZdZdZdZdZRS(t backgroundt borderwidthRR!R%tcursortheightthighlightbackgroundthighlightcolorthighlightthicknesstmenutpadxtpadytrelieftscreent takefocustuseR+twidthcKstj|j|S(N(tTkintertTopleveltroot(Rtkwargs((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt_createBscCsN|j}tj|j}|j|d|dt|j|dddS(NR8teqR"(RR@tMenuRBt checkParamR(RRR8((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_menuEs cCs|j}|j|ddytjd}Wntk rQ|jdnX|j|d|dd|jd|}|j|d|dS(NR<R"tDISPLAYsNo $DISPLAY set.Rs3can't modify -screen option after widget is created(RRtostenvirontKeyErrortskipTestR(RRtdisplayR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_screenKs  cCsn|j}|j|dd|jdt}|j}|jd|}|jt|d|dS(NR>R"R%(RRR)twinfo_idtint(RRtparenttwidR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_useWs   (s backgroundR2sclassscolormaps containerR3R4R5R6R7smenuR9R:R;sscreenR=susesvisualswidth(RR.tOPTIONSRDRHRORT(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyR08s   t FrameTestcBseZdZdZRS(R1R2RR!R%R3R4R5R6R7R;R=R+R?cKstj|j|S(N(R@tFrameRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDis(s backgrounds borderwidthsclassscolormaps containerscursorsheightshighlightbackgroundshighlightcolorshighlightthicknesssreliefs takefocussvisualswidth(RR.RURD(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRV`s tLabelFrameTestcBs)eZdZdZdZdZRS(R1R2RR!R%R3tfontt foregroundR4R5R6R7t labelanchort labelwidgetR9R:R;R=ttextR+R?cKstj|j|S(N(R@t LabelFrameRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDxscCsW|j}|j|ddddddddd d d d d |j|dddS(NR[tetentestntnetnwtstsetswtwtwntwstcenter(RtcheckEnumParamR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_labelanchor{s   cCsQ|j}tj|jdddd}|j|d|dd|jdS(NR]tMupptnametfooR\texpecteds.foo(RR@tLabelRBRGtdestroy(RRtlabel((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_labelwidgets (s backgrounds borderwidthsclassscolormaps containerscursorRYRZsheightshighlightbackgroundshighlightcolorshighlightthicknesss labelanchors labelwidgetspadxspadysreliefs takefocusstextsvisualswidth(RR.RURDRmRu(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRXms  tAbstractLabelTestcBseZeZdZRS(c Cs2|j}|j|ddddddddS(NR7ig?g@iit10p(RtcheckPixelsParam(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_highlightthicknesss  (RR.R t _conv_pixelsRy(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRvst LabelTestcBseZdZdZRS(tactivebackgroundtactiveforegroundtanchorR1tbitmapR2tcompoundR3tdisabledforegroundRYRZR4R5R6R7timagetjustifyR9R:R;tstateR=R]t textvariablet underlineR?t wraplengthcKstj|j|S(N(R@RrRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDs(R|R}R~s backgroundRs borderwidthRscursorRsfonts foregroundsheightshighlightbackgroundshighlightcolorshighlightthicknesssimageRspadxspadysreliefsstates takefocusstextRRswidthR(RR.RURD(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyR{st ButtonTestc Bs eZd"Zd Zd!ZRS(#R|R}R~R1RR2tcommandRR3R,RRYRZR4R5R6R7RRt overreliefR9R:R;t repeatdelaytrepeatintervalRR=R]RRR?RcKstj|j|S(N(R@tButtonRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs)|j}|j|dddddS(NR,tactivetdisabledtnormal(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_defaults ( sactivebackgroundsactiveforegroundsanchors backgroundsbitmaps borderwidthRscompoundscursorsdefaultsdisabledforegroundsfonts foregroundsheightshighlightbackgroundshighlightcolorshighlightthicknesssimagesjustifyRspadxspadysreliefRRsstates takefocusstexts textvariables underlineswidths wraplength(RR.RURDR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs tCheckbuttonTestc&Bs)eZd)Zd&Zd'Zd(ZRS(*R|R}R~R1RR2RRR3RRYRZR4R5R6R7Rt indicatoronRt offrelieftoffvaluetonvalueRR9R:R;t selectcolort selectimageRR=R]Rt tristateimaget tristatevalueRtvariableR?RcKstj|j|S(N(R@t CheckbuttonRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs,|j}|j|ddddddS(NRigffffff@R"s any string(Rt checkParams(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_offvalues cCs,|j}|j|ddddddS(NRigffffff@R"s any string(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_onvalues (&sactivebackgroundsactiveforegroundsanchors backgroundsbitmaps borderwidthscommandscompoundscursorsdisabledforegroundsfonts foregroundsheightshighlightbackgroundshighlightcolorshighlightthicknesssimageRsjustifyRsoffvaluesonvalues overreliefspadxspadysreliefRRsstates takefocusstexts textvariableRRs underlinesvariableswidths wraplength(RR.RURDRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs  tRadiobuttonTestc%Bs eZd'Zd%Zd&ZRS((R|R}R~R1RR2RRR3RRYRZR4R5R6R7RRRRRR9R:R;RRRR=R]RRRRtvalueRR?RcKstj|j|S(N(R@t RadiobuttonRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs,|j}|j|ddddddS(NRigffffff@R"s any string(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_values (%sactivebackgroundsactiveforegroundsanchors backgroundsbitmaps borderwidthscommandscompoundscursorsdisabledforegroundsfonts foregroundsheightshighlightbackgroundshighlightcolorshighlightthicknesssimages indicatoronsjustifys offreliefs overreliefspadxspadysreliefs selectcolors selectimagesstates takefocusstexts textvariables tristateimages tristatevalues underlinesvaluesvariableswidths wraplength(RR.RURDR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs tMenubuttonTestcBseZd(ZeeZdZdZd Ze j j Z e j ejd!kd"d#Zd$Zd%Zd&Zd'ZRS()R|R}R~R1RR2RR3t directionRRYRZR4R5R6R7RRRR8R9R:R;RR=R]RRR?RcKstj|j|S(N(R@t MenubuttonRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs/|j}|j|dddddddS(NRtabovetbelowtflushtlefttright(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_directions  cCs/|j}|j|dddddtdS(NR4idiitconv(RtcheckIntegerParamtstr(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_heights tdarwins"crashes with Cocoa Tk (issue19733)c Cs|j}tjd}|j|d|dtd}|jtj}d|dZd?ZRS(BtautoseparatorsR1t blockcursorR2R3tendlineRRYRZR4R5R6R7tinactiveselectbackgroundRRRRtinsertunfocussedRtmaxundoR9R:R;RRRtsetgridtspacing1tspacing2tspacing3t startlineRttabsttabstyleR=tundoR?RRtyscrollcommandiicKstj|j|S(N(R@tTextRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_autoseparatorss cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_blockcursors cCs|j}djdtdD}|jd||j|dddd|j|dd dd|j|dd d d |j|dd |j|dd|j|ddd ddS(Ns css|] }dVqdS(sLine %dN((t.0ti((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pys sidtendRiRqR"iRRsexpected integer but got "spam"i2R ii s1-startline must be less than or equal to -endline(RtjointrangetinsertRGR(RRR]((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_endlines cCs^|j}|j|ddddd|j|dddd|j|dd dddS( NR4idgLY@gfffffY@t3ciRqii(RRxRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs cCs)|j}|j|dddddS(NRiii(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_maxundo s cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_inactiveselectbackgrounds icCs)|j}|j|dddddS(NRthollowRtsolid(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_insertunfocusseds  c Cs>|j}|j|ddddddtdtd kdS( NRg?g@iRwRt keep_origii(ii(RRxRR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_selectborderwidths  cCsE|j}|j|ddddd|j|dddddS( NRigffffff5@g6@s0.5ciRqi(RRxRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_spacing1!s cCsE|j}|j|ddddd|j|dddddS( NRig@gffffff@s0.1ciRqi(RRxRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_spacing2&s cCsE|j}|j|ddddd|j|dddddS( NRigffffff5@g6@s0.5ciRqi(RRxRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_spacing3+s cCs|j}djdtdD}|jd||j|dddd|j|dd dd|j|dd d d |j|dd |j|dd|j|ddd ddS(Ns css|] }dVqdS(sLine %dN((R(R)((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pys 3sidR*R iRqR"iRRsexpected integer but got "spam"i Ri2iFs1-startline must be less than or equal to -endline(RR+R,R-RGR(RRR]((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_startline0s cCsK|j}tdkr1|j|dddn|j|ddddS(NiiRRR(ii(RRRRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyR>s  c Cs|j}tdkr7|j|ddd dn|j|dd|j|dd d d|j|dd d d|j|dddddtdkdS(Niii R!gffffff$@g333334@t1it2iRqs10.2s20.7s10.2 20.7 1i 2is2c left 4c 6c centert2cRt4ct6cRkRRsbad screen distance "spam"R5(iii (gffffff$@g333334@R;R<(s10.2s20.7R;R<(gffffff$@g333334@R;R<(s10.2s20.7R;R<(R=sleftR>R?scenter(ii(RRRGRR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_tabsEs  cCs&|j}|j|ddddS(NR"ttabulart wordprocessor(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_tabstyleTs cCs |j}|j|ddS(NR#(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_undoYs cCsU|j}|j|dd|j|dddd|j|dddddS(NR?iinRqii(RRRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyR]s cCsQ|j}tdkr4|j|ddddn|j|dddddS(NiiRtcharRtword(ii(RRRRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRcs  cCs|j}|j|jd|j|jd|jtj|jd|jtj|jd|jtj|j|jtj|jdddS(Ns1.1R*R(RRRt assertIsNoneRR@RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRjs ()sautoseparatorss backgrounds blockcursors borderwidthscursorsendlinesexportselectionsfonts foregroundsheightshighlightbackgroundshighlightcolorshighlightthicknesssinactiveselectbackgroundsinsertbackgroundsinsertborderwidths insertofftimes insertontimesinsertunfocusseds insertwidthsmaxundospadxspadysreliefsselectbackgroundsselectborderwidthsselectforegroundRsspacing1sspacing2sspacing3s startlinesstatestabsstabstyles takefocussundoswidthswrapsxscrollcommandR$(ii(RR.RURtFalseR(RDR&RR'R.RR0R1R4R6R7R8R9R:RR@RCRDRRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRsB               t CanvasTestcBs_eZd!ZeeZeZdZdZ dZ dZ dZ dZ d ZRS("R1R2t closeenoughtconfineR3R4R5R6R7RRRRRR;t scrollregionRRRRR=RtxscrollincrementR$tyscrollincrementR?cKstj|j|S(N(R@tCanvasRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDsc Cs2|j}|j|ddddddtdS(NRJig333333@g @iR(RRtfloat(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_closeenoughs cCs |j}|j|ddS(NRK(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_confines cCs|j}|j|dd|j|dd dd|j|dd|j|ddd d |j|dd |j|dd |j|dddS(NRLs 0 0 200 150iiiRqR"RRsbad scrollRegion "spam"(iiii(iiisspam(iii(iiiii(RRGR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_scrollregions cCs,|j}|j|ddddddS(NRRRRs0bad state value "{}": must be normal or disabled(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs c Cs2|j}|j|ddddddddS(NRMi(igD@gE@is0.5i(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_xscrollincrements  c Cs2|j}|j|ddddddddS(NRNi igffffff&@g333333+@is0.1i(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_yscrollincrements  (s backgrounds borderwidths closeenoughsconfinescursorsheightshighlightbackgroundshighlightcolorshighlightthicknesssinsertbackgroundsinsertborderwidths insertofftimes insertontimes insertwidthsreliefs scrollregionsselectbackgroundsselectborderwidthsselectforegroundsstates takefocussxscrollcommandsxscrollincrementsyscrollcommandsyscrollincrementswidth(RR.RURR RzRHR(RDRQRRRSRRTRU(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRIts&      t ListboxTestcBseZd(ZdZdZdZdZdZdZdZ dZ d Z d!Z d"Z d#Zd$Zd%Zd&Zd'ZRS()t activestyleR1R2R3RRRYRZR4R5R6R7t listvariableR;RRRt selectmodeRRR=R?RR$cKstj|j|S(N(R@tListboxRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs)|j}|j|dddddS(NRWtdotboxRR(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_activestyles  cCs/|j}tj}|j|d|dS(NRX(RR@t DoubleVartcheckVariableParam(RRtvar((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_listvariables  cCs\|j}|j|dd|j|dd|j|dd|j|dddS(NRYtsingletbrowsetmultipletextended(RRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_selectmodes  cCs&|j}|j|ddddS(NRRR(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs c Cs|j}|jtd|jdWdQXdj}|jd|x-t|D]\}}|j|d|q[W|jt|jWdQX|jtd|jdWdQX|j |jddd|j |jddd|j |jd dd|jd}|j |t x|j D]s\}}|j t|dt|d krD|j ||jd||j |d|jd|qDqDWdS(Nsitem number "0" out of rangeis)red orange yellow green blue white violetR*R1sbad listbox index "red"tredt BackgroundR"tviolets@0,0iii(R1R1RgR"Rf(R1R1RgR"Rh(R1R1RgR"Rf(ii(RtassertRaisesRegexpRt itemconfiguretsplitR-t enumerateRRRtassertIsInstancetdicttitemstassertIntlentitemcget(RRtcolorsR)tcolortdtktv((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_itemconfigures0  c Cs|j}|jddddd|jdi||6|j|jd|d||j|jd|||jtd|jdid |6WdQXdS( NR*RRRRuiisunknown color name "spam"R(RR-RjRRrRiR(RRoRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pytcheck_itemconfigures  cCs|jdddS(NR1s#ff0000(Ry(R((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_itemconfigure_backgroundscCs|jdddS(Ntbgs#ff0000(Ry(R((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_itemconfigure_bgscCs|jdddS(Ntfgs#110022(Ry(R((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_itemconfigure_fgscCs|jdddS(NRZs#110022(Ry(R((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_itemconfigure_foregroundscCs|jdddS(NRs#110022(Ry(R((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt#test_itemconfigure_selectbackgroundscCs|jdddS(NRs#654321(Ry(R((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt#test_itemconfigure_selectforegroundscCs|j}|jddtdD|j|j|jd|j|jd|j|jd|jt|jd|jt|jd|jt |j|jt |jdddS(Nicss|]}d|VqdS(sel%dN((R(R)((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pys siii Ri( RR-R,tpackRRRGRRRR(Rtlb((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_box s   cCs|j}|jddtdD|jdtj|jdd|jd|j|jd|j t |jddS( Nicss|]}d|VqdS(sel%dN((R(R)((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pys siiiii(iiii( RR-R,tselection_clearR@tENDt selection_setRt curselectionRR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_curselections   cCs|j}|jddtdD|j|jdd|j|jdd|j|jdd|j|jdd |j|jd d |j|jdd d|j|jd dd|j|jd dd|j|jddd|jt|jd|jt|jd|jt|j|jt|jdd|jt|jddd|jt|jddS(Nicss|]}d|VqdS(sel%dN((R(R)((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pys sitel0itel3R*tel7R"iitel4tel5tel6Riig333333@(RRR(RRR((R( RR-R,RtgetRRRR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_gets"  (s activestyles backgrounds borderwidthscursorsdisabledforegroundsexportselectionsfonts foregroundsheightshighlightbackgroundshighlightcolorshighlightthicknesss listvariablesreliefsselectbackgroundsselectborderwidthsselectforegrounds selectmodessetgridsstates takefocusswidthsxscrollcommandsyscrollcommand(RR.RURDR\R`ReRRxRyRzR|R~RRRRRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRVs0             t ScaleTestcBseZd+ZdZdZd Zd!Zd"Zd#Zd$Z d%Z d&Z d'Z d(Z d)Zd*ZRS(,R|R1t bigincrementR2RR3tdigitsRYRZRR5R6R7RttlengthtorientR;RRt resolutiont showvaluet sliderlengtht sliderreliefRR=t tickintervalRt troughcolorRR?tverticalcKstj|j|S(N(R@tScaleRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRD?scCs)|j}|j|dddddS(NRg(@g7@i(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_bigincrementBs cCs&|j}|j|ddddS(NRii(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_digitsFs cCs/|j}|j|dddddtdS(NRidg-@g333333.@R(RRtround(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRJs cCs6|j}|j|dd|j|dddS(NRts any stringR"(RRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_labelNs cCs,|j}|j|ddddddS(NRigffffff`@g33333`@t5i(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_lengthSs cCs,|j}|j|ddddddS(NRg@ig@i(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_resolutionWs cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_showvalue[s cCs/|j}|j|dddddddS(NRi gffffff&@g333333/@it3m(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_sliderlength_s  cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_sliderreliefds c CsQ|j}|j|ddddddt|j|dddd dtdS( NRig333333@gffffff@iRiRqi(RRRRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_tickintervalhs  c Cs2|j}|j|ddddddtdS(NRi,g-@g333333.@iR(RRR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRos (sactivebackgrounds backgrounds bigincrements borderwidthscommandscursorsdigitssfonts foregroundsfromshighlightbackgroundshighlightcolorshighlightthicknessslabelslengthRsreliefs repeatdelaysrepeatintervals resolutions showvalues sliderlengths sliderreliefsstates takefocuss tickintervalstoRsvariableswidth(RR.RUtdefault_orientRDRRRRRRRRRRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyR2s(           t ScrollbarTestcBsJeZdZeeZeZdZdZ dZ dZ dZ RS(R|t activereliefR1R2RR3telementborderwidthR5R6R7tjumpRR;RRR=RR?RcKstj|j|S(N(R@t ScrollbarRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_activereliefs cCs,|j}|j|ddddddS(NRg333333@gffffff@it1m(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_elementborderwidths cCs,|j}|j|ddddddS(NRRt horizontalRs4bad orientation "{}": must be vertical or horizontal(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_orients (sactivebackgrounds activereliefs backgrounds borderwidthscommandscursorselementborderwidthshighlightbackgroundshighlightcolorshighlightthicknesssjumpsorientsreliefs repeatdelaysrepeatintervals takefocuss troughcolorswidth( RR.RURR RzRHR(RRDRRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRus    tPanedWindowTestcBseZd+ZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZdZdZedZdZdZd Zd!Zed"d#d$Zd%Zd&Zd'Zd(Zed"d#d)Zd*ZRS(,R1R2R3t handlepadt handlesizeR4t opaqueresizeRR;t sashcursortsashpadt sashrelieft sashwidtht showhandleR?RcKstj|j|S(N(R@t PanedWindowRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs/|j}|j|dddddddS(NRig@gffffff@iR(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_handlepads c Cs5|j}|j|dddddddtdS(NRig"@g333333%@it2mR(RRxR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_handlesizes c Cs8|j}|j|ddddddddtdS( NR4idgLY@gfffffY@iiR;R(RRxR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs !cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_opaqueresizes cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_sashcursors cCs/|j}|j|dddddddS(NRig?g@iR(RRx(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_sashpads cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_sashreliefs c Cs5|j}|j|dddddddtdS(NRi g333333&@g333333/@iRR(RRxR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_sashwidths cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_showhandles c Cs8|j}|j|ddddddddtdS( NR?igfffff6y@gIy@iniRR(RRxR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs !cCsQ|j}tj|}tj|}|j||j||||fS(N(RR@Rtadd(RtpRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pytcreate2s    cCs|j\}}}|jt|j|j|}|j|txl|jD]^\}}|jt|d|j||j|||j|d|j ||qTWdS(Nii( RRRt paneconfigureRmRnRoRRqtpanecget(RRRRRuRvRw((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigurescCsd}|j s|r(t|}n|jr@|r@t}n|j|i||6|j||j||d||j||j|||dS(NcSs|S(N((tx((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pytsi(R(RRRR(RRRRoRRqt stringifyR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pytcheck_paneconfigures  &c Cs4|jt||j|id|6WdQXdS(NtbadValue(RiRR(RRRRotmsg((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pytcheck_paneconfigure_badscCsN|j\}}}|j||d|t||j||dddS(Ntaftersbad window path name "badValue"(RRRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_afterscCsN|j\}}}|j||d|t||j||dddS(Ntbeforesbad window path name "badValue"(RRRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_beforesc CsT|j\}}}|j||ddddtdk|j||dddS(NR4i Riisbad screen distance "badValue"(ii(RRRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_heights  iicCsH|j\}}}|j||dtd|j||dddS(Nthideis)expected boolean value but got "badValue"(RRRHR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_hidescCsH|j\}}}|j||ddd|j||dddS(Ntminsizei sbad screen distance "badValue"(RRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_minsize scCsH|j\}}}|j||ddd|j||dddS(NR9g?isbad screen distance "badValue"(RRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_padxscCsH|j\}}}|j||ddd|j||dddS(NR:g?isbad screen distance "badValue"(RRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_padyscCsH|j\}}}|j||ddd|j||dddS(Ntstickytnsewtnesws[bad stickyness value "badValue": must be a string containing zero or more of n, e, s, and w(RRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_stickyscCsH|j\}}}|j||ddd|j||dddS(NtstretchtalwtalwayssEbad stretch "badValue": must be always, first, last, middle, or never(RRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_stretch#sc CsT|j\}}}|j||ddddtdk|j||dddS(NR?i Riisbad screen distance "badValue"(ii(RRRR(RRRR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_paneconfigure_width+s  (s backgrounds borderwidthscursors handlepads handlesizesheights opaqueresizesorientsreliefs sashcursorssashpads sashreliefs sashwidths showhandleswidth(RR.RURRDRRRRRRRRRRRRRHRRRRRRRRRRRRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRs>                    tMenuTestcBseeZdZeZdZdZdZdZdZ dZ dZ dZ dZ RS(R|tactiveborderwidthR}R1R2R3RRYRZt postcommandR;RR=ttearoffttearoffcommandRttypecKstj|j|S(N(R@RFRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRD>scCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_postcommandAs cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_tearoffEs cCs |j}|j|ddS(NR(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_tearoffcommandIs cCs#|j}|j|dddS(NRs any string(RRG(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_titleMs cCs)|j}|j|dddddS(NRRRtmenubar(RRl(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_typeQs  cCs |j}|jdd|jt|j|jtd|jdWdQX|jd}|j|tx|j D]v\}}|j|t |j|t |j t |d|j |d||j |jd||dqW|jdS( NRtttestsbad menu entry index "foo"Rpiiii(Rt add_commandRRtentryconfigureRiRRmRnRoRttupleRRqt entrycgetRs(Rtm1RuRvRw((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_entryconfigureVs $cCsk|j}|jdd|j|jddd|jddd|j|jddddS(NRtRitchanged(RRRRR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_entryconfigure_labelfs  c Cs|j}tj|j}tj|j}|jd|dtdtdd|jt|j ddt||j dd||jt|j ddt|dS(NRRRRttNonsensei( RR@t BooleanVarRBtadd_checkbuttonR)RHRRRR(RRtv1tv2((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyttest_entryconfigure_variablems ((sactivebackgroundRsactiveforegrounds backgrounds borderwidthscursorsdisabledforegroundsfonts foregrounds postcommandsreliefs selectcolors takefocusstearoffstearoffcommandstitlestype(RR.RUR RzRDRRRRRRRR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyR3s        t MessageTestcBs&eZdZeZdZdZRS(R~taspectR1R2R3RYRZR5R6R7RR9R:R;R=R]RR?cKstj|j|S(N(R@tMessageRB(RRC((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRDscCs)|j}|j|dddddS(NRiii(RR(RR((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyt test_aspects (sanchorsaspects backgrounds borderwidthscursorsfonts foregroundshighlightbackgroundshighlightcolorshighlightthicknesssjustifyspadxspadysreliefs takefocusstexts textvariableswidth(RR.RUR R/RDR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pyRxs t__main__(0RR@RRJRttest.test_supportRRttest_ttk.supportRRRRt widget_testsRRR R R R R RRRRtTestCaseR0RVRXRvR{RRRRRRRRRIRVRRRRRt tests_guiR(((sA/usr/local/lib/python2.7/lib-tk/test/test_tkinter/test_widgets.pytsl    "F % '       AE ` 9B  D