{G_Tc@s<ddlZddlZddlZddlmZmZddlZddlZddlm Z m Z ddlm Z m Z ddl mZmZmZmZmZmZmZmZeddefdYZd ejfd YZd eefd YZeed eejfdYZeedeejfdYZdefdYZeedeejfdYZeedeejfdYZeedeejfdYZeeedeejfdYZ eeedeejfdYZ!eeedeejfdYZ"eedeejfd YZ#d!eejfd"YZ$eed#eejfd$YZ%eed%eejfd&YZ&ej'ej(d'kd(eed)eejfd*YZ)eeed+eejfd,YZ*eed-eejfd.YZ+eed/eejfd0YZ,eed1eejfd2YZ-eee e!eeee$e*e"e&e#e%e)e,e-e+efZ.e/d3kr8ee.ndS(4iN(trequirest run_unittest(t MockTclObjt MockStateSpec(t tcl_versiontget_tk_patchlevel(tadd_standard_optionstnoconvt noconv_methtAbstractWidgetTesttStandardOptionsTeststIntegerSizeTeststPixelSizeTestst setUpModuletguitStandardTtkOptionsTestscBs#eZdZdZdZRS(cCs|j}|j|ddd}td kr>d}n|j|ddd ||jd d}|j|dddS( Ntclassts"attempt to change read-only optioniiis"Attempt to change read-only optiontFooterrmsgtclass_(iii(tcreatet assertEqualRtcheckInvalidParam(tselftwidgetRtwidget2((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_classs  c Cs|j}|j|dddd|j|dddd|j|dddd|j|dddd|j|dddd|j|dd|j|dddddS(Ntpaddingitexpectedt0it5it6it7it8t5pt6pt7pt8pR(R(R(ii(RR (iii(RR R!(iiii(RR R!R"(R#R$R%R&((Rt checkParam(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_paddings cCs|j}|j|ddd}t|drQdt|dj}n|j|ddd||jdd}|j|d ddS( NtstyleRsLayout Foo not foundtdefault_orientsLayout %s.Foo not foundRRRR(RRthasattrtgetattrttitleR(RRRR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_style*s (t__name__t __module__RR(R.(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs t WidgetTestcBs2eZdZdZdZdZdZRS(s,Tests methods available in every ttk widget.cCsCtjtjdddd|_|jj|jjdS(NtwidthittexttText(tsupporttroot_deiconifytttktButtonRtpacktwait_visibility(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytsetUp<s  cCs|jjtjdS(N(RtdestroyR5t root_withdraw(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttearDownBs cCs|jj|j|jj|jjd|jjdd|j|jjddd|jtj|jjdd|jtj|jjdd|jtj|jjdddS(NitlabeliRi( Rtupdate_idletasksRtidentifyt winfo_widtht winfo_heightt assertRaisestTkintertTclErrortNone(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_identifyGs cCs|j|jjd |j|jjdgt|j|jjdgd |j|jjdgd |j|jjddgd |j|jjddgd|j|jjddgdd}|j|jjdg|didd6didd6f|jj}|jtj|jjd g|jtj|jjdd g|j||jj|jjddg|j|jjddS(Ns !disabledtdisabledtactives!activec[s ||fS(N((targ1tkw((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_cbdsthittheretmsgtbadstate((s !disabled((s!activeRI(((RJ(RRtstatetinstatetTrueRDRERF(RRMt currstate((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_widget_stateTs(""   (R/R0t__doc__R;R>RHRV(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR19s    tAbstractToplevelTestcBseZeZRS((R/R0Rt _conv_pixels(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRXxst FrameTestc BseZd Zd ZRS( t borderwidthRtcursortheightRtreliefR)t takefocusR2cKstj|j|S(N(R7tFrametroot(Rtkwargs((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt_creates( R[sclassR\sheightspaddingR^sstyleR_swidth(R/R0tOPTIONSRc(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRZ|stLabelFrameTestc Bs)eZdZd ZdZdZRS(R[RR\R]t labelanchort labelwidgetRR^R)R_R3t underlineR2cKstj|j|S(N(R7t LabelFrameRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs]|j}|j|ddddddddd d d d d dd|j|dddS(NRftetentestntnetnwtstsetswtwtwntwsRs!Bad label anchor specification {}tcenter(RtcheckEnumParamR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_labelanchors   'cCsQ|j}tj|jdddd}|j|d|dd|jdS(NR3tMupptnametfooRgRs.foo(RR7tLabelRaR'R<(RRR?((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_labelwidgets ( s borderwidthsclassscursorsheights labelanchors labelwidgetspaddingsreliefsstyles takefocusstexts underlineswidth(R/R0RdRcRxR}(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRes  tAbstractLabelTestcBs,eZdZdZdZdZRS(cCstjd}tjd}|j|||dd |j||ddd |j|||fdd |j|||d|fdd |j||ddd |j||ddddS(Ntimage1timage2RRJsimage1 active image2tspamRsimage "spam" doesn't exist(R(R(R(Rsactivesimage2(Rsactivesimage2(REt PhotoImageR'R(RRRztimageR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytcheckImageParamsc Cs8|j}|j|ddddddddd dS( NtcompoundtnoneR3RRvttoptbottomtlefttright(RRw(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_compounds   cCs)|j}|j|dddddS(NRRRJRItnormal(Rt checkParams(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_states cCs)|j}|j|dddddS(NR2iini(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_widths (R/R0RRRR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR~s  t LabelTestcBs&eZdZeZdZdZRS(tanchort backgroundRRR\tfontt foregroundRtjustifyRR^RRR)R_R3t textvariableRhR2t wraplengthcKstj|j|S(N(R7R|Ra(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs#|j}|j|dddS(NRs3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*(RR'(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_fonts  (sanchors backgroundsclassscompoundscursorsfonts foregroundsimageRspaddingsreliefsstatesstyles takefocusstextRs underlineswidthR(R/R0RdRRYRcR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs t ButtonTestc Bs)eZdZd ZdZdZRS(RtcommandRR\tdefaultRRRR)R_R3RRhR2cKstj|j|S(N(R7R8Ra(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs)|j}|j|dddddS(NRRRJRI(RRw(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_defaults cs<gtjdfd}|j|jdS(NRcs jdS(Ni(tappend((tsuccess(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyts(R7R8tinvoket assertTrue(Rtbtn((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_invokes ( sclassscommandscompoundscursorsdefaultsimagesstatesstyles takefocusstexts textvariables underlineswidth(R/R0RdRcRR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs   tCheckbuttonTestcBs2eZdZdZdZdZdZRS(RRRR\RtoffvaluetonvalueRRR)R_R3RRhtvariableR2cKstj|j|S(N(R7t CheckbuttonRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs,|j}|j|ddddddS(NRigffffff@Rs any string(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_offvalues cCs,|j}|j|ddddddS(NRigffffff@Rs any string(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_onvalues csgfd}tjd|}|j|jd |jtj|jj|d|j }|j|d|j|d|jj|d|j d|d<|j }|j t ||j td|j|d |jj|ddS( NcsjddS(Niscb test called(R((R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytcb_tests Rt alternateRscb test calledRRiR(R(R7RRRRRDRERFttkt globalgetvarRRt assertFalsetstrtassertLessEqualtlen(RRtcbtntres((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs"       (sclassscommandscompoundscursorsimagesoffvaluesonvaluesstatesstyles takefocusstexts textvariables underlinesvariableswidth(R/R0RdRcRRR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs   t ComboboxTestc Bs_eZdZd Zd ZdZdZdZdZdZ dZ dZ RS(RR\texportselectionR]Rt postcommandRRR)R_RtvaluesR2cCs0tt|jtj|j|_dS(N(tsuperRR;R5R6Rtcombo(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;#s cCs.|jjtjtt|jdS(N(RR<R5R=RRR>(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>(s  cKstj|j|S(N(R7tComboboxRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRc-sc Cs2|j}|j|ddddddddS(NR]idgLY@gfffffY@iit1i(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_height0s cCs)|j}|j|dddddS(NRRRJRIR(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR4s cCs`|jj}|jjdd|ddd|jjdd|ddd|jjdS(Nstxitys(RRBtevent_generateR@(RR2((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt_show_drop_down_listbox8s  csgdg|jd<|jjdfd|jj|jj|jj}|j|jj|jjd|jj|jdS(NiRs<>cs jtS(N(RRT(tevt(R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRDss( RtbindR9R:RCRtupdateRR(RR]((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_virtual_event?s      cs~gfd|jd<|jj|jj|j|jd|jd<|j|jtddS(Ncs jtS(N(RRT((R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRTsRRi(RR9R:RRRR(R((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_postcommandQs      c sfd}jjdtd#kr1d$nd|ddjjdddd%jjdd&jjdd'jjdtd(krd)nddddgjd<jjd|ddjjd|ddjjd|ddjjdd*jd<|ddjjddddgjjdjrd+nddddgjd<jjdjrd,ndddd gjd<jjdjrd-nd!jt j jjt jdjt j jjdt j ddddg}j|djrd.nd"|jdS(/Ncs6jjj|jjj|dS(N(RRtgettcurrent(tgetvaltcurrval(R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytcheck_get_currentbsRiiRismon tue wed thurRtmonttuetwedtthuri*gQ @s any stringtaitciitdit1t2s1 {} 2sa bsa bsa bs{a b} {a b} {a b}sa\tbs"a"s} {sa\\tb {"a"} \}\ \{s1 2 {}(ii((RRRR(RRRR(i*gQ @Rs any string(ii((iiRi(RRR(sa bsa bsa b(sa\tbs"a"s} {(RRR(RRRR'tsetRt configuret wantobjectsRDRERFRR7RR<(RRtcombo2((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_valuesasL (      ( sclassscursorRsheightsjustifys postcommandsstatesstyles takefocuss textvariablesvaluesswidth( R/R0RdR;R>RcRRRRRR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs        t EntryTestcBseZdZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZdZRS(RRR\RRtinvalidcommandRtshowRRR)R_RtvalidatetvalidatecommandR2txscrollcommandcCs0tt|jtj|j|_dS(N(RRR;R5R6Rtentry(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;s cCs.|jjtjtt|jdS(N(RR<R5R=RRR>(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>s  cKstj|j|S(N(R7tEntryRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs |j}|j|ddS(NR(RtcheckCommandParam(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_invalidcommands cCsI|j}|j|dd|j|dd|j|dddS(NRt*Rt (RR'(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_shows cCs)|j}|j|dddddS(NRRRIRtreadonly(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs  c Cs2|j}|j|ddddddddS(NRtalltkeytfocustfocusintfocusoutR(RRw(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_validates  cCs |j}|j|ddS(NR(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_validatecommands cCsU|j|jjd|jtj|jjd|jtj|jjddS(Nitnoindex(tassertIsBoundingBoxRtbboxRDRERFRG(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_bboxscCs|jj|jj|jj|j|jjddd|j|jjddd|jtj|jjdd|jtj|jjdd|jtj|jjdddS(NittextareaiR( RR9R:R@RRARDRERFRG(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRHs   cs#gfd}d|jdRcRRRRRRRHRRR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs$           tPanedWindowTestcBs_eZdZdZdZd Zd Zd Zd Zd Z dZ dZ RS(RR\R]torientR)R_R2cCs0tt|jtj|j|_dS(N(RRR;R5R6Rtpaned(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;0s cCs.|jjtjtt|jdS(N(RR<R5R=RRR>(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>5s  cKstj|j|S(N(R7t PanedWindowRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRc:scCs|j}|jt|ddd}td krDd}n|j|ddd ||jdd}|jt|dddS( NRtverticals"attempt to change read-only optioniiis"Attempt to change read-only optiont horizontalR(iii(RRRRR(RRRR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_orient=s  cCsntj|j}tj|}|jtj|jj||j|jtj}tj|}|jtj|jj||j|jtj}|jj||jtj|jj|tj|j}|jj||j|jj d|jj d|jtj|jj d|j|j|jtj|jj ddS(Niii( R7R|RRDRERFtaddR<Rtpane(RR?tchildt good_childt other_child((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_addHs(      (  cCs~|jtj|jjd|jtj|jjd|jjtj|jjd|jtj|jjddS(Ni( RDRERFRtforgetRGR R7R|(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_forgetds cCs|jtj|jjdd|jtj|jjdd|jtj|jjddtj}tj}tj}|jtj|jjd||jjd||jjd||j|jj t |t |f|jjd||j|jj t |t |f|jjd||j|jj t |t |t |f|jj }|jjd||j||jj |jj|||j|jj t |t |t |fdS(NiR( RDRERFRRRGR7R|RtpanesR(RRtchild2tchild3R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_insertms*   ++"cCs|jtj|jjdtj}|jj||j|jjdt |j |jjddd|j r~dnd|j |jjdd|j rdnd|j |jjd|jjt ||jtj|jjddddS(NitweightRt badoptiont somevalue(RDRERFRRR7R|R tassertIsInstancetdictRRGRR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_panes .cCsi|jtj|jjd|jtj|jjd|jtj|jjdtj|jdd}|jj|dd|jtj|jjdtj|jdd}|jj||jtj|jjd|jj dt d d |jj |jjd}|jjdd |j ||jjd|j |jjdtdS( NRiR3RRitbtexpandtfilltbothi(RDRERFRtsashposRGR7R|R R9RTR:tassertNotEqualRtint(RRRtcurr_pos((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_sashposs (sclassscursorsheightsorientsstyles takefocusswidth( R/R0RdR;R>RcR RRRRR'(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR)s     # tRadiobuttonTestcBs)eZdZdZdZdZRS(RRRR\RRRR)R_R3RRhtvalueRR2cKstj|j|S(N(R7t RadiobuttonRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs,|j}|j|ddddddS(NR)igffffff@Rs any string(RR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_values csgfd}tj}tjd|d|dd}tjd|d|dd}|jrrd}nt}|j}|j|d|j||d|j|j|j||j j |d|j d |d<|j}|jt |d |j td|j||d|j|j|j||j j |d|jt |dt |ddS( NcsjddS(Niscb test called(R((R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs RRR)iicSs|S(N((R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsscb test calledR(REtIntVarR7R*RR%RRRRRRRRR(RRtmyvarRtcbtn2tconvR((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs,         (sclassscommandscompoundscursorsimagesstatesstyles takefocusstexts textvariables underlinesvaluesvariableswidth(R/R0RdRcR+R(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR(s  tMenubuttonTestc Bs)eZdZd ZdZdZRS(RRR\t directionRtmenuRRR)R_R3RRhR2cKstj|j|S(N(R7t MenubuttonRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs/|j}|j|dddddddS(NR1tabovetbelowRRtflush(RRw(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_directions  cCsH|j}tj|dd}|j|d|dt|jdS(NRzR2R/(RREtMenuR'RR<(RRR2((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_menus ( sclassscompoundscursors directionsimagesmenusstatesstyles takefocusstexts textvariables underlineswidth(R/R0RdRcR7R9(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR0s  t ScaleTestc BsteZdZeZd Zd Zd ZdZdZ dZ dZ dZ dZ dZdZRS(RRR\tfromtlengthRR)R_ttoR)RR cCsJtt|jtj|j|_|jj|jjdS(N( RR:R;R5R6RtscaleR9R(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;s   cCs.|jjtjtt|jdS(N(R>R<R5R=RR:R>(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>s  cKstj|j|S(N(R7tScaleRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs/|j}|j|dddddtdS(NR;idg-@g333333.@R/(RtcheckFloatParamR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_froms cCs,|j}|j|ddddddS(NR<igffffff`@g33333`@t5i(RtcheckPixelsParam(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_lengths c Cs2|j}|j|ddddddtdS(NR=i,g-@g333333.@iR/(RR@R(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tos c Cs2|j}|j|ddddddtdS(NR)i,g-@g333333.@iR/(RR@R(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR+#s csdddg|jjdfd}d|jd>cs jS(N(tpop(R(tfailure(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR*si R;tfrom_iR=iiii(R>RRR(Rtfuncid((RGs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_custom_event's    cCs|jrd}nt}|jj}|j|jj|d|jd|j||jjdd||jd|j|jj|jdd|jd<|j|jj|jd|jtj|jjdd|jtj|jjdddS(NcSs|S(N((R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR<siR=R;R)iR( RtfloatR>RBRRRDRERF(RR/t scale_width((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_get:s  &2   cCs|jrd}nt}||jd}|d}|jj||j||jj|||jd}|jj|d|j||jj|tj}||jd<|j|d|j||jj|j|j||jj|d~|d|jd<|j||jj|d|j||jj||jd|j||jjd d ||j||jj|jjd ||j tj |jjddS( NcSs|S(N((R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRNsR=i R;iRiR)i( RRKR>RRRREt DoubleVarRBRDRFRG(RR/tmaxtnew_maxtmintvar((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_setLs,     %##,%.( sclassscommandscursorsfromslengthsorientsstyles takefocusstosvaluesvariable(R/R0RdRRYR*R;R>RcRARDRER+RJRMRS(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR:s         tProgressbarTestc BsPeZdZeZd Zd Zd ZdZdZ dZ dZ RS(RR\RR<tmodetmaximumtphaseR)R_R)RR cKstj|j|S(N(R7t ProgressbarRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRczscCs)|j}|j|dddddS(NR<gfffffY@gYL@t2i(RRC(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRD}s c Cs2|j}|j|ddddddtdS(NRVgfffffb@glS@iiR/(RR@R(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_maximums cCs&|j}|j|ddddS(NRUt determinatet indeterminate(RRw(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_modes cCsdS(N((R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_phasesc Cs2|j}|j|ddddddtdS(NR)gfffffb@glS@iiR/(RR@R(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR+s ( sclassscursorsorientslengthsmodesmaximumRWsstyles takefocussvaluesvariable( R/R0RdRRYR*RcRDRZR]R^R+(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRTps     tdarwins"ttk.Scrollbar is special on MacOSXt ScrollbarTestcBseZdZdZdZRS( RRR\RR)R_R cKstj|j|S(N(R7t ScrollbarRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcs(sclassscommandscursorsorientsstyles takefocus(R/R0RdR*Rc(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR`st NotebookTestcBszeZdZdZdZdZd Zd Zd Zd Z d Z dZ dZ dZ dZRS(RR\R]RR)R_cCstt|jtj|jdd|_tj|_ tj|_ |jj |j dd|jj |j dddS(NRiR3RR( RRbR;R5R6RtnbR7R|tchild1RR (R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;s cCsH|jj|jj|jjtjtt|jdS(N( RdR<RRcR5R=RRbR>(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>s     cKstj|j|S(N(R7tNotebookRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCs|jjd|jj|j|jtj|jj|j|j |jj dd|jj |j|j |jj dd|jj |j|j |jjd|jj |jdd|jj|jjtjdkrd}nd }|j |jj||jjdxhtd d d D]G}y*|jjd |dddkrtPnWqEtjk rqEXqEW|jd dS(NiRiRR3RR_s@20,5s@5,5iids@%d, 5sTab with text 'a' not found(RcRthideRRDRERFttabRdRtindexR tselectRR9R:tsystplatformtrangeRGtfail(Rttb_idxti((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tab_identifierss,   ("cCs|jtj|jjd|jtj|jjd|jtj|jjd|jtj|jjd|jtj|jjtjdd|jj }|jj|j |jj|j |j |jj |tj}|jj|dd|jj }|jj d}|jj |j }|jj|j |jj|j |j |jj ||j |jj |j ||j t|j |jj ||j |jj d|ddS( NiRNtunknowntoptionR3RRi(RDRERFRcRfRGR R7R|ttabsRdRRhRR(RRsRtcurrt child2_index((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_add_and_hiddens*! &cCs+|jtj|jjd|jtj|jjd|jtj|jjd|jj}|jj|j}|jj|j|j t |j|jj|j t |dt |jj|jj |j|j |jj|jd|j||jj|jdS(NiRNi(RDRERFRcRRGRsRhRdt assertNotInRRRR R$(RRst child1_index((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs")cCs|jtj|jjd|jtj|jjd|j|jjdt|j|jj|j d|j|jj|j d|j|jjdddS(NiRiii( RDRERFRcRhRGRR%RRdR(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_indexs cCs|jj}|jjd|d|j|jj|d|df|jj|j|j|j|jj||jjd|j|j|jj|d|df|jjdd|j|jj||jtj|jjd|d|jtj|jjd|dt j }|jjd||j|jj|dt ||df|jj ||j|jj||jj|j||j|jjt |f||jj ||jtj|jjd||jtj|jjd||jtj|jjdd|jtj|jjdd|jtj|jjdddS(NiiRii(RcRsRRRdRRDRERFR7R|RRRG(RRsR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs0''## 0&cs|jj|jjgg|jjdfd|jjdfd|j|jjt|j|jj|j|j |j|jjt|j|jj |j dS(Nscs jtS(N(RRT(R(R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR7ss<>cs jtS(N(RRT(R(t tab_changed(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR9s( RcR9R:RdRRRiRRRR(R((RRzs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_select0s   " " cCs|jtj|jjd|jtj|jjd|jtj|jjd|j|jj|jt|j |jj|jddd|j |jj|jdd|jj|jdd|j |jj|jddd|j |jj|jdddS(NitnotabR3Rtabc( RDRERFRcRgRGRRdRR(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tabDs%"%cCsb|jt|jjd|jj|j|jj|j|j|jjddS(Ni((RRRcRsRRdR(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tabsRscCs|jj|jj|jjdtj|jdd|jj|jjd|j|jjt |j |jj|jjd|j|jjt |j |jj|jjd|j|jjt |j |jj |j dddd|jj |jjtj|jddtjdkrn|jjd n|jjd |j|jjt |j dS( Niis sR3RRhR_s s(RcR9R:RiR5tsimulate_mouse_clickt focus_forceRRRRRdRgtenable_traversalRjRk(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_traversal[s*   " " "  (sclassscursorsheightspaddingsstyles takefocus(R/R0RdR;R>RcRpRvRRyRR{R~RR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRbs      !   t TreeviewTestc BseZd"Zd Zd ZdZdZdZdZdZ dZ dZ dZ dZ dZdZdZdZdZdZdZdZdZd Zd!ZRS(#RtcolumnsR\tdisplaycolumnsR]Rt selectmodeRR)R_RtyscrollcommandcCs6tt|jtj|jdd|_dS(NRi(RRR;R5R6Rttv(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;s cCs.|jjtjtt|jdS(N(RR<R5R=RRR>(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>s  cKstj|j|S(N(R7tTreeviewRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcscCsa|j}|j|dddd |j|dd |j|dtd krVd nd dS(NRsa b cRRRRiiR(RRR(RRR(ii((RR'R(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_columnss  cCs|j}d|d<|j|dddd|j|dd|j|dddd|j|dd|j|ddd d|j|ddd d|j|ddd ddS(NRRRRRsb a cRs#alliiiRRsInvalid column index disColumn index 3 out of boundsisColumn index -2 out of bounds(RRR(RRR(RRR(s#all(iii(RRR(iii(ii(RR'R(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_displaycolumnss  c CsN|j}|j|ddddddt|j|ddddtdS( NR]idiit3cR/gLY@gfffffY@(RRCRR(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs "cCs)|j}|j|dddddS(NRRtbrowsetextended(RRw(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_selectmodes  cCs|j}|j|dddd|j|dd|j|dd|j|dddd |j|dddd dS( NRs tree headingsRttreetheadings(RR(RR(RR(R(R(RR'(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs cCsW|jj|j|jjdd|jj|jj|jjdd}|jj}|j||jj|d}|j |dg|jd<|jj ddd|jj|dd}|jj ddd}|j st |}n|j|d|d||jj|d}|j|jj|ddS( NRRittestRR2i2s#0(RR9RRR:RRt get_childrenRRtcolumnRGRR%(Rtitem_idtchildrenRt bbox_column0t root_widthRd((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs$      cCs>|j|jjd|jjdd}|j|jjt|j|jjd||jjdd}|jjdd}|jj||||j|jj|||f|jtj |jj|||jj||j|jj|d|jjd|j|jjddS(NRRi(((( RRRRRttuplet set_childrenRDRERF(RRRR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_childrens" cCsi|j|jjdt|jrJ|j|jjdddtn|jjddd|j|jjdd|jrdnd|j|jjddd|jrdnd|jt j |jjddd|jt j |jjdidd 6id d 6id d 6id d6id d 6g}x-|D]%}|jt j |jjd|q<WdS(Ns#0R2i t10tidtXRs some valuetunknown_optiontwrongtstretchRtminwidth( RRRRRRGR%RRDRERF(Rt invalid_kwsRL((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_columns %"$ cCs?|jtj|jjd|jjdd}|jj|d}|j|jj|f|j|jj||f|jj||j|jj|jtj|jj |dd|jjdd}|jjdd}|j|jj||f|jj|||j|jjdS(Ns#0RR( RDRERFRRRRRRtreattach(RRtitem2titem1((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_deletes cCs0|jjdd}|jj|d}|jj}|jj|j||jj|j|jj|f|j|jj||f|jj||j|jj|jj|dd|j|jj|f|j|jj||f|jj|dd|j|jj||f|j|jj|d|jt j |jjddd|jt j |jjd|jt j |jj|dd|jt j |jj|dd|jj|||j|jjd|j|jj|ddS( NRRt nonexistentt otherparentR(((( RRRtdetachRRRtmoveRDRERF(RRRtprev((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_detach_reattachs4     cCst|j|jjdt|j|jjdt|j|jjit|jtj|jjddS(Nt somethingR( RRtexistsRRTRDRERFRG(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_existsIscCs|j|jjd|jjdd}|jj||j|jj||jj||j|jjd|jtj|jjddS(NRRRN(RRRRRRDRERF(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_focusTscCs|j|jjdt|jjddd|j|jjddd|j|jjdddd|jtj|jjddd|jtj|jjddddS(Ns#0R3RNRRi( RRtheadingRRRGRDRERF(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_headingcs"csfd}gjjjjjjddfdjjdddjj|ddsjdngjjj}jjddt jjdddj |jjj|ddsjdndS( Ncs'tjj||jjdS(N(R5RRR(RR(R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytsimulate_heading_clicktss#0Rcs jtS(N(RRT((R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR|sR2idis>The command associated to the treeview heading wasn't invoked.( RR9R:RRRRmtmastert _tclCommandsRRGR(RRtcommands((RRs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_heading_callbackss"    . cCs|jtj|jjd|j|jjdd|jjdd}|jjdd}|jj|d}|jj|d}|j|jj|d|j|jj|d|j|jj|d|j|jj|d|jj|dd|j|jj|d|j|jj|d|jj||j|jj|d|jj||j|jj|d|jj ||jtj|jj|dS(NtwhatRiRi( RDRERFRRhRRRRR(RRRtc1tc2((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRys&cCs^|jtj|jjdd|jtj|jjdddd|jtj|jjdddd|j|jj|jjdddt|j|jj|jjdddt|jtj|jjdd|jjddd}|j |d|jtj|jjddd|jtj|jjddt dd}|jjddd |f}|j |jj |d |j r|fn||j |jj |d d|j r|fn||jj |d |jj|jj |d d|j |jj |d d|j r@|fn||j|jj |t|jj |d d|j|jj |d d|jjddd d d |g}|j |jj |d d|j rd d|fnd||jj |d g|j|jj |d d|jj |d d|j |jj |d d|j rodnd|jjddd dd||ff}|j |jj |d d|j rdd||ffn d||f|j |jj |jjddddddd|j |jj |jjddd|dd|dS(NRRRtopentpleasetmiddles first-itemuábaRttagsiiRRs1 2 %ss1 2sa b cs%s %ss{a b c} {%s %s}R3s Label here(ii(RR(RDRERFRRRRRTRRRtitemRRGRat splitlistRR(RtitemidR)R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_insert_items\.. 4$ !!cCsPddg|jd<|jjdddddg}|j|jj|idd6dd6|jj|dd|j|jj|dd|jrdnd dg|jd<|j|jj|idd6|jj|dd|j|jj|d dd|j|jj|dd|jr:dnd |jj|dd |j|jj|d|jr~d nd |j|jj|dd|jrdnd|j|jj||jrid d6n id d6|jtj |jj|d|jtj |jj|dd|jtj |jjddS(NtAtBRRRRRRsa aRsb ai{t123s123 atnotme(RR(RR(i{R( RRRRRRGRRDRERF(RR((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRSs,!*#"$"c sg|jjddddg}|jjddddg}|jjddfd|jjddfd|jj|jj|jjt}t}xqtd d d D]]}t|d krPn|jj |}|r||kr|j ||j |qqW|j t|d x$|D]}t j |jd |qJW|j td xAtddd ddd D]}|j |dqWdS(NRRRtcallscs jdS(Ni(R(R(tevents(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsscs jdS(Ni(R(R(R(s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR siidi iii(ii(RRttag_bindR9R:RRRlRt identify_rowR RR5Rtzip( RRRtpos_ytfoundRoRRR((Rs=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tag_binds2       0cCs|jt|jj|jtj|jjddd|jjddd|jt|jjddd|jt|jjdddd|j |jjdt dS(NRtskytblueR( RDt TypeErrorRt tag_configureRERFRRRGRR(R((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tag_configure;s !( sclassscolumnsscursorsdisplaycolumnssheightspaddings selectmodesshowsstyles takefocussxscrollcommandR(R/R0RdR;R>RcRRRRRRRRRRRRRRRyRRSRR(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRws2            *   "  D ! "t SeparatorTestcBseZdZdZdZRS(RR\RR)R_R cKstj|j|S(N(R7t SeparatorRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcPs(sclassscursorsorientsstyles takefocus(R/R0RdR*Rc(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRHst SizegripTestcBseZdZdZRS(RR\R)R_cKstj|j|S(N(R7tSizegripRa(RRb((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRc[s(sclassscursorsstyles takefocus(R/R0RdRc(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRTst__main__(0tunittestRER7ttest.test_supportRRRjR5ttest_functionsRRRRt widget_testsRRRR R R R R RtTestCaseR1RXRZReR~RRRRRRR(R0R:RTtskipIfRkR`RbRRRt tests_guiR/(((s=/usr/local/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytsp     : '?     0 1 p "