kWc@sIddlZddlZddlmZddlZddlmZmZddlZddl m Z ddl m Z m Z mZmZddlmZmZmZmZmZmZmZmZeddefd YZd e ejfd YZd eefd YZeedeejfdYZeedeejfdYZdefdYZeedeejfdYZ eedeejfdYZ!eedeejfdYZ"eeedeejfdYZ#eeedeejfdYZ$eeedeejfdYZ%eed eejfd!YZ&d"eejfd#YZ'eed$eejfd%YZ(eed&eejfd'YZ)ej*ej+d(kd)eed*eejfd+YZ,eeed,eejfd-YZ-eed.eejfd/YZ.eed0eejfd1YZ/eed2eejfd3YZ0e!e"e#e$eee e'e-e%e)e&e(e,e/e0e.efZ1e2d4krEee1ndS(5iN(tTclError(trequirest run_unittest(t MockTclObj(tAbstractTkTestt tcl_versiontget_tk_patchleveltsimulate_mouse_click(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((s7/usr/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(R!R"(iii(R!R"R#(iiii(R!R"R#R$(R%R&R'R(((Rt checkParam(RR((s7/usr/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((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_style+s (t__name__t __module__RR*R0(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs t WidgetTestcBs)eZdZdZdZdZRS(s,Tests methods available in every ttk widget.cCsRtt|jtj|jdddd|_|jj|jjdS(NtwidthittexttText( tsuperR3tsetUptttktButtontrootRtpacktwait_visibility(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8=s! cCs|jj|j|jj|jjd|jjdd|j|jjddd|jtj|jjdd|jtj|jjdd|jtj|jjdddS(NitlabeliRi( Rtupdate_idletasksRtidentifyt winfo_widtht winfo_heightt assertRaisesttkinterRtNone(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_identifyDs 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((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_cbasthittheretmsgtbadstate((s !disabled((s!activeRG(((RH(RRtstatetinstatetTrueRCRDR(RRKt currstate((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_widget_stateQs(""   (R1R2t__doc__R8RFRT(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR3:s  tAbstractToplevelTestcBseZeZRS((R1R2R t _conv_pixels(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRVust FrameTestc BseZd Zd ZRS( t borderwidthRtcursortheightRtreliefR+t takefocusR4cKstj|j|S(N(R9tFrameR;(Rtkwargs((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs( RYsclassRZsheightspaddingR\sstyleR]swidth(R1R2tOPTIONSR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRXystLabelFrameTestc Bs)eZdZd ZdZdZRS(RYRRZR[t labelanchort labelwidgetRR\R+R]R5t underlineR4cKstj|j|S(N(R9t LabelFrameR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs]|j}|j|ddddddddd d d d d dd|j|dddS(NRbtetentestntnetnwtstsetswtwtwntwsRs!Bad label anchor specification {}tcenter(RtcheckEnumParamR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_labelanchors   'cCsQ|j}tj|jdddd}|j|d|dd|jdS(NR5tMupptnametfooRcRs.foo(RR9tLabelR;R)tdestroy(RRR>((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_labelwidgets ( s borderwidthsclassscursorsheights labelanchors labelwidgetspaddingsreliefsstyles takefocusstexts underlineswidth(R1R2R`RRtRz(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRas  tAbstractLabelTestcBs,eZdZdZdZdZRS(cCstjd|jdd}tjd|jdd}|j|||dd |j||ddd |j|||fdd |j|||d|fdd|j||ddd|j||dd d dS(NtmasterRvtimage1timage2RRHsimage1 active image2tspamRsimage "spam" doesn't exist(R}(R}(R}(R}sactivesimage2(R}sactivesimage2(RDt PhotoImageR;R)R(RRRvtimageR~((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytcheckImageParamsc Cs8|j}|j|ddddddddd dS( NtcompoundtnoneR5RRrttoptbottomtlefttright(RRs(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_compounds   cCs)|j}|j|dddddS(NRPRHRGtnormal(Rt checkParams(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_states cCs)|j}|j|dddddS(NR4iini(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_widths (R1R2RRRR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR{s  t LabelTestcBs&eZdZeZdZdZRS(tanchort backgroundRRRZtfontt foregroundRtjustifyRR\RPR+R]R5t textvariableRdR4t wraplengthcKstj|j|S(N(R9RxR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs#|j}|j|dddS(NRs3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*(RR)(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_fonts  (sanchors backgroundsclassscompoundscursorsfonts foregroundsimageRspaddingsreliefsstatesstyles takefocusstextRs underlineswidthR(R1R2R`R RWRR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs t ButtonTestc Bs)eZdZd ZdZdZRS(RtcommandRRZtdefaultRRPR+R]R5RRdR4cKstj|j|S(N(R9R:R;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs)|j}|j|dddddS(NRRRHRG(RRs(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_defaults csBgtj|jdfd}|j|jdS(NRcs jdS(Ni(tappend((tsuccess(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyts(R9R:R;tinvoket assertTrue(Rtbtn((Rs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_invokes! ( sclassscommandscompoundscursorsdefaultsimagesstatesstyles takefocusstexts textvariables underlineswidth(R1R2R`RRR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs   tCheckbuttonTestcBs2eZdZdZdZdZdZRS(RRRRZRtoffvaluetonvalueRPR+R]R5RRdtvariableR4cKstj|j|S(N(R9t CheckbuttonR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs,|j}|j|ddddddS(NRigffffff@Rs any string(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_offvalues cCs,|j}|j|ddddddS(NRigffffff@Rs any string(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_onvalues csgfd}tj|jd|}|j|jd |jtj|jj |d|j }|j|d|j|d|jj |d|j d|d<|j }|j t ||jtd|j|d |jj |ddS( NcsjddS(Niscb test called(R((R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytcb_tests Rt alternateRscb test calledRRiR(R(R9RR;RRPRCRDRttkt globalgetvarRRt assertFalsetstrtassertLessEqualtlen(RRtcbtntres((Rs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs"       (sclassscommandscompoundscursorsimagesoffvaluesonvaluesstatesstyles takefocusstexts textvariables underlinesvariableswidth(R1R2R`RRRR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs   t ComboboxTestc BsVeZdZd Zd ZdZdZdZdZdZ dZ RS(RRZtexportselectionR[Rt postcommandRPR+R]RtvaluesR4cCs&tt|j|j|_dS(N(R7RR8Rtcombo(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8 scKstj|j|S(N(R9tComboboxR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR$sc Cs2|j}|j|ddddddddS(NR[idgLY@gfffffY@iit1i(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_height's cCs)|j}|j|dddddS(NRPRHRGR(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR+s cCs`|jj}|jjdd|ddd|jjdd|ddd|jjdS(Nstxitys(RRAtevent_generateR?(RR4((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt_show_drop_down_listbox/s  csgdg|jd<|jjdfd|jj|jj|jj}|j|jj|jjd|jj|jdS(NiRs<>cs jtS(N(RRR(tevt(R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;ss( RtbindR<R=RBRtupdateRR(RR[((Rs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_virtual_event6s      cs~gfd|jd<|jj|jj|j|jd|jd<|j|jtddS(Ncs jtS(N(RRR((R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRKsRRi(RR<R=RRRR(R((Rs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_postcommandHs      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 jddddg}j|djrd.nd"|jdS(/Ncs6jjj|jjj|dS(N(RRtgettcurrent(tgetvaltcurrval(R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytcheck_get_currentYsRiiRismon 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 wantobjectsRCRDRRR9RR;Ry(RRtcombo2((Rs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_valuesXsL (     ! ( sclassscursorRsheightsjustifys postcommandsstatesstyles takefocuss textvariablesvaluesswidth( R1R2R`R8RRRRRRR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs       t EntryTestcBszeZdZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZRS(RRRZRRtinvalidcommandRtshowRPR+R]RtvalidatetvalidatecommandR4txscrollcommandcCs&tt|j|j|_dS(N(R7RR8Rtentry(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8scKstj|j|S(N(R9tEntryR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs |j}|j|ddS(NR(RtcheckCommandParam(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_invalidcommands cCsI|j}|j|dd|j|dd|j|dddS(NRt*Rt (RR)(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_shows cCs)|j}|j|dddddS(NRPRGRtreadonly(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs  c Cs2|j}|j|ddddddddS(NRtalltkeytfocustfocusintfocusoutR(RRs(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_validates  cCs |j}|j|ddS(NR(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_validatecommands cCsU|j|jjd|jtj|jjd|jtj|jjddS(Nitnoindex(tassertIsBoundingBoxRtbboxRCRDRRE(R((s7/usr/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( RR<R=R?RR@RCRDRRE(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRFs   cs#gfd}d|jdtchildt good_childt other_child((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_add3s(    (  cCs|jtj|jjd|jtj|jjd|jjtj|j |jjd|jtj|jjddS(Ni( RCRDRRtforgetRER R9RxR;(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_forgetOs cCs|jtj|jjdd|jtj|jjdd|jtj|jjddtj|j}tj|j}tj|j}|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( RCRDRRRRER9RxR;RtpanesR(RR tchild2tchild3R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_insertXs*++"cCs |jtj|jjdtj|j}|jj||j |jjdt |j |jjddd|j rdnd|j |jjdd|j rdnd|j |jjd|jjt||jtj|jjddddS(NitweightR t badoptiont somevalue(RCRDRRR R9RxR;R tassertIsInstancetdictRRERR(RR ((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_pane{s.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( NRiR5RRitbtexpandtfilltbothi(RCRDRRtsashposRER9RxR R<RRR=tassertNotEqualRtint(RR Rtcurr_pos((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_sashposs (sclassscursorsheightsorientsstyles takefocusswidth( R1R2R`R8RR RRRRR$(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs    # tRadiobuttonTestcBs)eZdZdZdZdZRS(RRRRZRRPR+R]R5RRdtvalueRR4cKstj|j|S(N(R9t RadiobuttonR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs,|j}|j|ddddddS(NR&igffffff@Rs any string(RR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_values csgfd}tj|j}tj|jd|d|dd}tj|jd|d|dd}|jrd}nt}|j}|j|d|j||d|j |j|j ||j j |d|j d |d<|j}|jt |d |jtd|j||d|j |j|j ||j j |d|jt |dt |ddS( NcsjddS(Niscb test called(R((R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs RRR&iicSs|S(N((R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsscb test calledR(RDtIntVarR;R9R'RR"RRRRRRRRR(RRtmyvarRtcbtn2tconvR((Rs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs0        (sclassscommandscompoundscursorsimagesstatesstyles takefocusstexts textvariables underlinesvaluesvariableswidth(R1R2R`RR(R(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR%s  tMenubuttonTestc Bs)eZdZd ZdZdZRS(RRRZt directionRtmenuRPR+R]R5RRdR4cKstj|j|S(N(R9t MenubuttonR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs/|j}|j|dddddddS(NR.tabovetbelowRRtflush(RRs(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_directions  cCsH|j}tj|dd}|j|d|dt|jdS(NRvR/R,(RRDtMenuR)RRy(RRR/((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_menus ( sclassscompoundscursors directionsimagesmenusstatesstyles takefocusstexts textvariables underlineswidth(R1R2R`RR4R6(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR-s  t ScaleTestc BskeZdZeZd Zd Zd ZdZdZ dZ dZ dZ dZ dZRS(RRRZtfromtlengthRR+R]ttoR&RRcCs@tt|j|j|_|jj|jjdS(N(R7R7R8RtscaleR<R(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8s cKstj|j|S(N(R9tScaleR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs/|j}|j|dddddtdS(NR8idg-@g333333.@R,(RtcheckFloatParamR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_froms cCs,|j}|j|ddddddS(NR9igffffff`@g33333`@t5i(RtcheckPixelsParam(RR((s7/usr/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((s7/usr/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((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR( s csdddg|jjdfd}d|jd>cs jS(N(tpop(R(tfailure(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsi R8tfrom_iR:iiii(R;RRR(Rtfuncid((RDs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_custom_events    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((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR#siR:R8R&iR( RtfloatR;RARRRCRDR(RR,t scale_width((s7/usr/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|j}||jd<|j|d|j||jj|j|j||jj|d~|d|jd<|j||jj|d|j||jj||jd|j||jjd d ||j||jj|jj d ||j tj |jjddS( NcSs|S(N((R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR5sR:i R8iRiR&i( RRHR;RRRRDt DoubleVarR;RARCRRE(RR,tmaxtnew_maxtmintvar((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_set3s,    %##,%.( sclassscommandscursorsfromslengthsorientsstyles takefocusstosvaluesvariable(R1R2R`R RWR,R8RR>RARBR(RGRJRP(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR7s        tProgressbarTestc BsPeZdZeZd Zd Zd ZdZdZ dZ dZ RS(RRZRR9tmodetmaximumtphaseR+R]R&RRcKstj|j|S(N(R9t ProgressbarR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRascCs)|j}|j|dddddS(NR9gfffffY@gYL@t2i(RR@(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRAds c Cs2|j}|j|ddddddtdS(NRSgfffffb@glS@iiR,(RR=R(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_maximumhs cCs&|j}|j|ddddS(NRRt determinatet indeterminate(RRs(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_models cCsdS(N((R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_phasepsc Cs2|j}|j|ddddddtdS(NR&gfffffb@glS@iiR,(RR=R(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR(ts ( sclassscursorsorientslengthsmodesmaximumRTsstyles takefocussvaluesvariable( R1R2R`R RWR,RRARWRZR[R((((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRQWs     tdarwins"ttk.Scrollbar is special on MacOSXt ScrollbarTestcBseZdZdZdZRS( RRRZRR+R]RcKstj|j|S(N(R9t ScrollbarR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs(sclassscommandscursorsorientsstyles takefocus(R1R2R`R,R(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR]zst NotebookTestcBsqeZdZdZdZdZd Zd Zd Zd Z d Z dZ dZ dZ RS(RRZR[RR+R]cCstt|j|jdd|_tj|j|_tj|j|_ |jj |jdd|jj |j dddS(NRiR5RR( R7R_R8RtnbR9RxR;tchild1RR (R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8s cKstj|j|S(N(R9tNotebookR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs|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(NiRiRR5RR\s@20,5s@5,5iids@%d, 5sTab with text 'a' not found(R`RthideRRCRDRttabRaRtindexR tselectRR<R=tsystplatformtrangeREtfail(Rttb_idxti((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tab_identifierss,   ("cCs|jtj|jjd|jtj|jjd|jtj|jjd|jtj|jjd|jtj|jjtj|j dd|jj }|jj|j |jj|j |j |jj |tj|j }|jj|dd|jj }|jj d}|jj |j}|jj|j|jj|j|j |jj ||j |jj |j||j t|j|jj ||j |jj d|ddS( NiRLtunknowntoptionR5RRi(RCRDRR`RcRER R9RxR;ttabsRaRReRR(RRpR tcurrt child2_index((s7/usr/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(NiRLi(RCRDRR`RRERpReRat assertNotInRRRR R!(RRpt child1_index((s7/usr/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( RCRDRR`ReRERR"RRaR(R((s7/usr/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 |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(R`RpRRRaRRCRDRR9RxR;RRRE(RRpR((s7/usr/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(RRR(R(R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRss<>cs jtS(N(RRR(R(t tab_changed(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs( R`R<R=RaRRRfRRRR(R((RRws7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_selects   " " cCs|jtj|jjd|jtj|jjd|jtj|jjd|j|jj|jt|j |jj|jddd|j |jj|jdd|jj|jdd|j |jj|jddd|j |jj|jdddS(NitnotabR5Rtabc( RCRDRR`RdRERRaRR(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tab#s%"%cCsb|jt|jjd|jj|j|jj|j|j|jjddS(Ni((RRR`RpRRaR(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tabs1scCs|jj|jj|jjdt|jdd|jj|jjd|j|jjt|j |jj|jjd|j|jjt|j |jj|jjd|j|jjt|j |jj |j dddd|jj |jjt|jddt jdkrh|jjd n|jjd |j|jjt|j dS( Niis sR5RRdR\s s(R`R<R=RfRt focus_forceRRRRRaRdtenable_traversalRgRh(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_traversal:s*   " " "  (sclassscursorsheightspaddingsstyles takefocus(R1R2R`R8RRmRsRRvRRxR{R|R(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR_s      !   t TreeviewTestc BseZd"Zd Zd ZdZdZdZdZdZ dZ dZ dZ dZ dZdZdZdZdZdZdZdZdZd Zd!ZRS(#RtcolumnsRZtdisplaycolumnsR[Rt selectmodeRR+R]RtyscrollcommandcCs,tt|j|jdd|_dS(NRi(R7RR8Rttv(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8^scKstj|j|S(N(R9tTreeviewR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRbscCsa|j}|j|dddd |j|dd |j|dtd krVd nd dS(NRsa b cRRRRiiR(RRR(RRR(ii((RR)R(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_columnses  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((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_displaycolumnsls  c CsN|j}|j|ddddddt|j|ddddtdS( NR[idiit3cR,gLY@gfffffY@(RR@RR (RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR|s "cCs)|j}|j|dddddS(NRRtbrowsetextended(RRs(RR((s7/usr/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((s7/usr/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( NRRittestRR4i2s#0(RR<RRR=RRt get_childrenRRtcolumnRERR"(Rtitem_idtchildrenRt bbox_column0t root_widthRa((s7/usr/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_childrenRCRDR(RRRR((s7/usr/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#0R4i t10tidtXRs some valuetunknown_optiontwrongtstretchRtminwidth( RRRRRRER"RRCRDR(Rt invalid_kwsRJ((s7/usr/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( RCRDRRRRRRRtreattach(RRtitem2titem1((s7/usr/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(((( RRRtdetachRRRtmoveRCRDR(RRRtprev((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_detach_reattachs4     cCst|j|jjdt|j|jjdt|j|jjit|jtj|jjddS(Nt somethingR( RRtexistsRRRRCRDRRE(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_exists"scCs|j|jjd|jjdd}|jj||j|jj||jj||j|jjd|jtj|jjddS(NRRRL(RRRRRRCRDR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_focus-scCs|j|jjdt|jjddd|j|jjddd|j|jjdddd|jtj|jjddd|jtj|jjddddS(Ns#0R5RLRRi( RRtheadingRRRERCRDR(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_heading<s"csfd}gjjjjjjddfdjjdddjj|ddsjdngjjj}jjddt jjdddj |jjj|ddsjdndS( Ncs$tj||jjdS(N(RRR(RR(R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytsimulate_heading_clickMss#0Rcs jtS(N(RRR((R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRUsR4idis>The command associated to the treeview heading wasn't invoked.( RR<R=RRRRjR|t _tclCommandsRRER(RRtcommands((RRs7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_heading_callbackLs"    . 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( RCRDRRReRRRRR(RRRtc1tc2((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRvns&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}R5s Label here(ii(RR(RCRDRRRRRRRRRRtitemRRER;t splitlistRR(RtitemidR&R((s7/usr/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( RRRRRRERRCRDR(RR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRPs,!*#"$"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 |jd |qJW|j td xAt ddd ddd D]}|j |dqWdS(NRRRtcallscs jdS(Ni(R(R(tevents(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsscs jdS(Ni(R(R(R(s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsiidi iii(ii(RRttag_bindR<R=RRRiRt identify_rowR RRtzip( RRRtpos_ytfoundRlRRR((Rs7/usr/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( RCt TypeErrorRt tag_configureRDRRRRERR(R((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tag_configures !cCs|jjddddddg}|jjddddddg}|jt|jj|jt|jjdd |j|jjd||j|jjd||j|jjd||j|jjd||j|jjd ||j|jjd ||j|jjd|f|j|jjd|f|j|jjd d dS( NRRR5sItem 1Rttag1sItem 2ttag2s non-existingttag3(( RRRCRttag_hasRRRR(RRR((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tag_has s$$( sclassscolumnsscursorsdisplaycolumnssheightspaddings selectmodesshowsstyles takefocussxscrollcommandR(R1R2R`R8RRRRRRRRRRRRRRRRvRRPRRR(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRVs2           *   "  D ! " t SeparatorTestcBseZdZdZdZRS(RRZRR+R]RcKstj|j|S(N(R9t SeparatorR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR8s(sclassscursorsorientsstyles takefocus(R1R2R`R,R(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR0st SizegripTestcBseZdZdZRS(RRZR+R]cKstj|j|S(N(R9tSizegripR;(RR_((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyRCs(sclassscursorsstyles takefocus(R1R2R`R(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pyR<st__main__(3tunittesttTkinterRDRR9ttest.test_supportRRRgttest_functionsRtsupportRRRRt widget_testsRR R R R R RRRtTestCaseR3RVRXRaR{RRRRRRR%R-R7RQtskipIfRhR]R_RRRt tests_guiR1(((s7/usr/lib/python2.7/lib-tk/test/test_ttk/test_widgets.pytsp    ": ';     0} 3 j "