zfc@sUddlZddlZddlmZddlZddlmZmZmZm Z ddl Z ddl m Z ddl mZmZmZmZddlmZmZmZmZmZmZmZmZeddefd YZd eejfd YZd eefd YZeedeejfdYZeedeejfdYZ defdYZ!eede!ejfdYZ"eede!ejfdYZ#eede!ejfdYZ$eeedeejfdYZ%eeede%ejfdYZ&eeedeejfdYZ'eed e!ejfd!YZ(d"e!ejfd#YZ)eed$eejfd%YZ*eed&eejfd'YZ+ej,e j-d(kd)eed*eejfd+YZ.eeed,eejfd-YZ/eed.eejfd/YZ0eed0eejfd1YZ1eed2eejfd3YZ2e#e$e&e%ee e"e)e/e'e+e(e*e.e1e2e0efZ3e4d4krQee3ndS(5iN(tTclError(trequirest run_unittestt have_unicodetu(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|dd d ||jd d }|j|dd dS(Ntclassts"attempt to change read-only optioniiitbetais"Attempt to change read-only optiontFooterrmsgtclass_(iiiRi(tcreatet assertEqualRtcheckInvalidParam(tselftwidgetRtwidget2((s9/usr/lib64/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((s9/usr/lib64/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((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_style+s (t__name__t __module__R R-R3(((s9/usr/lib64/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( tsuperR6tsetUptttktButtontrootRtpacktwait_visibility(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;=s! cCs|jj|j|jj|jjd|jjdd|j|jjddd|jtj|jjdd|jtj|jjdd|jtj|jjdddS(NitlabeliRi( Rtupdate_idletasksRtidentifyt winfo_widtht winfo_heightt assertRaisesttkinterRtNone(R((s9/usr/lib64/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((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_cbasthittheretmsgtbadstate((s !disabled((s!activeRJ(((RK(RRtstatetinstatetTrueRFRGR(RRNt currstate((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_widget_stateQs(""   (R4R5t__doc__R;RIRW(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR6:s  tAbstractToplevelTestcBseZeZRS((R4R5R t _conv_pixels(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRYust FrameTestc BseZd Zd ZRS( t borderwidthRtcursortheightR!treliefR.t takefocusR7cKstj|j|S(N(R<tFrameR>(Rtkwargs((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs( R\RR]R^R!R_R.R`R7(R4R5tOPTIONSR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR[ystLabelFrameTestc Bs)eZdZd ZdZdZRS(R\RR]R^t labelanchort labelwidgetR!R_R.R`R8t underlineR7cKstj|j|S(N(R<t LabelFrameR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs]|j}|j|ddddddddd d d d d dd|j|dddS(NRetetentestntnetnwtstsetswtwtwntwsRs!Bad label anchor specification {}tcenter(RtcheckEnumParamR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_labelanchors   'cCsQ|j}tj|jdddd}|j|d|dd|jdS(NR8tMupptnametfooRfR"s.foo(RR<tLabelR>R,tdestroy(RRRA((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_labelwidgets ( R\RR]R^ReRfR!R_R.R`R8RgR7(R4R5RcRRwR}(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRds  tAbstractLabelTestcBs,eZdZdZdZdZRS(cCstjd|jdd}tjd|jdd}|j|||dd |j||ddd |j|||fdd |j|||d|fdd|j||ddd|j||dd d dS(NtmasterRytimage1timage2R"RKsimage1 active image2tspamRsimage "spam" doesn't exist(R(R(R(RRKR(RRKR(RGt PhotoImageR>R,R(RRRytimageR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pytcheckImageParamsc Cs8|j}|j|ddddddddd dS( NtcompoundtnoneR8RRuttoptbottomtlefttright(RRv(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_compounds   cCs)|j}|j|dddddS(NRSRKRJtnormal(Rt checkParams(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_states cCs)|j}|j|dddddS(NR7iini(RR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_widths (R4R5RRRR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR~s  t LabelTestcBs&eZdZeZdZdZRS(tanchort backgroundR\RRR]tfontt foregroundRtjustifyR!R_RSR.R`R8t textvariableRgR7t wraplengthcKstj|j|S(N(R<R{R>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs#|j}|j|dddS(NRs3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*(RR,(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_fonts  (RRR\RRR]RRRRR!R_RSR.R`R8RRgR7R(R4R5RcR RZRR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs t ButtonTestcBs)eZdZdZdZdZRS(RtcommandRR]tdefaultRR!RSR.R`R8RRgR7cKstj|j|S(N(R<R=R>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs)|j}|j|dddddS(NRRRKRJ(RRv(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_defaults csBgtj|jdfd}|j|jdS(NRcs jdS(Ni(tappend((tsuccess(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pytR(R<R=R>tinvoket assertTrue(Rtbtn((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_invokes! (RRRR]RRR!RSR.R`R8RRgR7(R4R5RcRRR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs  tCheckbuttonTestcBs2eZdZdZdZdZdZRS(RRRR]RtoffvaluetonvalueR!RSR.R`R8RRgtvariableR7cKstj|j|S(N(R<t CheckbuttonR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs,|j}|j|ddddddS(NRigffffff@Rs any string(RR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_offvalues cCs,|j}|j|ddddddS(NRigffffff@Rs any string(RR(RR((s9/usr/lib64/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(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pytcb_tests Rt alternateRscb test calledRRiR(R(R<RR>RRSRFRGRttkt globalgetvarRRt assertFalsetstrtassertLessEqualtlen(RRtcbtntres((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs"       (RRRR]RRRR!RSR.R`R8RRgRR7(R4R5RcRRRR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs   t EntryTestcBszeZdZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZRS(RRR]texportselectionRRtinvalidcommandRtshowRSR.R`RtvalidatetvalidatecommandR7txscrollcommandcCs&tt|j|j|_dS(N(R:RR;Rtentry(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;#scKstj|j|S(N(R<tEntryR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR'scCs |j}|j|ddS(NR(RtcheckCommandParam(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_invalidcommand*s cCsI|j}|j|dd|j|dd|j|dddS(NRt*Rt (RR,(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_show.s cCs)|j}|j|dddddS(NRSRJRtreadonly(RR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR4s  c Cs2|j}|j|ddddddddS(NRtalltkeytfocustfocusintfocusoutR(RRv(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_validate9s  cCs |j}|j|ddS(NR(RR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_validatecommand>s cCsU|j|jjd|jtj|jjd|jtj|jjddS(Nitnoindex(tassertIsBoundingBoxRtbboxRFRGRRH(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_bboxCscCs|jj|jj|jjtjdkrX|j|jjdddn|j|jjddd|j|jjddd|j t j |jjdd|j t j |jjdd|j t j |jjdddS(NtdarwinittextareasCombobox.buttoniR(RsCombobox.button( RR?R@RBtsystplatformtassertInRCRRFRGRRH(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRIIs    cs#gfd}d|jd(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRsc Cs2|j}|j|ddddddddS(NR^idgLY@gfffffY@iit1i(RR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_heights cCs`|jj}|jjdd|ddd|jjdd|ddd|jjdS(Nstxitys(RRDtevent_generateRB(RR7((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt_show_drop_down_listboxs  csgdg|jd<|jjdfd|jj|jj|jj}|j|jj|jjd|jj|jdS(NiRs<>cs jtS(N(RRU(tevt(R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRRs( RtbindR?R@RERtupdateRR(RR^((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_virtual_events      cs~gfd|jd<|jj|jj|j|jd|jd<|j|jtddS(Ncs jtS(N(RRU((R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRRRRi(RR?R@RRRR(R((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_postcommands      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(RRRtcurrent(tgetvaltcurrval(R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pytcheck_get_currentsRiiRismon tue wed thurR"tmonttuetwedtthuri*gQ @s any stringRitciitdit1t2s1 {} 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 wantobjectsRFRGRRR<RR>R|(RRtcombo2((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_valuessL (     ! (RRR]RRRR^RRRRRSR.R`RRRRR7R( R4R5RcR;RRRRRR (((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs      tPanedWindowTestcBsVeZdZdZdZd Zd Zd Zd Zd Z dZ RS(RR]R^torientR.R`R7cCs&tt|j|j|_dS(N(R:R R;Rtpaned(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;&scKstj|j|S(N(R<t PanedWindowR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR*scCs|j}|jt|ddd}td krDd }n|j|dd d ||jdd }|jt|dd dS( NR tverticals"attempt to change read-only optioniiiRis"Attempt to change read-only optiont horizontalR(iiiRi(RRRRR(RRRR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_orient-s  cCsztj|j}tj|}|jtj|jj||j|jtj|j}tj|}|jtj|jj||j|jtj|j}|jj||jtj|jj|tj|j}|jj||j |jj d|jj d|jtj|jj d|j|j|jtj|jj ddS(Niii( R<R{R RFRGRtaddR|R>Rtpane(RRAtchildt good_childt other_child((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_add8s(    (  cCs|jtj|jjd|jtj|jjd|jjtj|j |jjd|jtj|jjddS(Ni( RFRGRR tforgetRHRR<R{R>(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_forgetTs 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( RFRGRR RRHR<R{R>RtpanesR(RRtchild2tchild3R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_insert]s*++"cCs |jtj|jjdtj|j}|jj||j |jjdt |j |jjddd|j rdnd|j |jjdd|j rdnd|j |jjd|jjt||jtj|jjddddS(NitweightR#t badoptiont somevalue(RFRGRR RR<R{R>RtassertIsInstancetdictRRHRR(RR((s9/usr/lib64/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( NRiR8RRitbtexpandtfilltbothi(RFRGRR tsashposRHR<R{RR?RUR@tassertNotEqualR tint(RRRtcurr_pos((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_sashposs (RR]R^R R.R`R7( R4R5RcR;RRRRRR"R+(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR s    # tRadiobuttonTestcBs)eZdZdZdZdZRS(RRRR]RR!RSR.R`R8RRgtvalueRR7cKstj|j|S(N(R<t RadiobuttonR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs,|j}|j|ddddddS(NR-igffffff@Rs any string(RR(RR((s9/usr/lib64/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(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs RRR-iicSs|S(N((R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRRscb test calledR(RGtIntVarR>R<R.RR)RRRRRRRRR(RRtmyvarRtcbtn2tconvR((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs0        (RRRR]RR!RSR.R`R8RRgR-RR7(R4R5RcRR/R(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR,s  tMenubuttonTestcBs)eZdZdZdZdZRS(RRR]t directionRtmenuR!RSR.R`R8RRgR7cKstj|j|S(N(R<t MenubuttonR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs/|j}|j|dddddddS(NR5tabovetbelowRRtflush(RRv(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_directions  cCsH|j}tj|dd}|j|d|dt|jdS(NRyR6R3(RRGtMenuR,RR|(RRR6((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_menus (RRR]R5RR6R!RSR.R`R8RRgR7(R4R5RcRR;R=(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR4s  t ScaleTestc BskeZdZeZd Zd Zd ZdZdZ dZ dZ dZ dZ dZRS(RRR]tfromtlengthR R.R`ttoR-RRcCs@tt|j|j|_|jj|jjdS(N(R:R>R;RtscaleR?R(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;s cKstj|j|S(N(R<tScaleR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRscCs/|j}|j|dddddtdS(NR?idg-@g333333.@R3(RtcheckFloatParamR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_froms cCs,|j}|j|ddddddS(NR@igffffff`@g33333`@t5i(RtcheckPixelsParam(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_lengths c Cs2|j}|j|ddddddtdS(NRAi,g-@g333333.@iR3(RRDR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_to s c Cs2|j}|j|ddddddtdS(NR-i,g-@g333333.@iR3(RRDR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR/s csdddg|jjdfd}d|jd>cs jS(N(tpop(R(tfailure(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRRi R?tfrom_iRAiiii(RBRRR(Rtfuncid((RKs9/usr/lib64/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((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR(RiRAR?R-iR( RtfloatRBRDRRRFRGR(RR3t scale_width((s9/usr/lib64/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((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR:RRAi R?iRiR-i( RRORBRRRRGt DoubleVarR>RDRFRRH(RR3tmaxtnew_maxtmintvar((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_set8s,    %##,%.( RRR]R?R@R R.R`RAR-R(R4R5RcR RZR/R;RRERHRIR/RNRQRW(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR>s        tProgressbarTestc BsPeZdZeZd Zd Zd ZdZdZ dZ dZ RS(RR]R R@tmodetmaximumtphaseR.R`R-RRcKstj|j|S(N(R<t ProgressbarR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRfscCs)|j}|j|dddddS(NR@gfffffY@gYL@t2i(RRG(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRHis c Cs2|j}|j|ddddddtdS(NRZgfffffb@glS@iiR3(RRDR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_maximumms cCs&|j}|j|ddddS(NRYt determinatet indeterminate(RRv(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_modeqs cCsdS(N((R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_phaseusc Cs2|j}|j|ddddddtdS(NR-gfffffb@glS@iiR3(RRDR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR/ys ( RR]R R@RYRZR[R.R`R-R( R4R5RcR RZR/RRHR^RaRbR/(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRX\s     Rs"ttk.Scrollbar is special on MacOSXt ScrollbarTestcBseZdZdZdZRS( RRR]R R.R`RcKstj|j|S(N(R<t ScrollbarR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs(RRR]R R.R`(R4R5RcR/R(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRcst NotebookTestcBsqeZdZdZdZd Zd Zd Zd Zd Z dZ dZ dZ dZ RS(RR]R^R!R.R`R7cCstt|j|jdd|_tj|j|_tj|j|_ |jj |jdd|jj |j dddS(NR!iR8RR#( R:ReR;RtnbR<R{R>tchild1RR(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;s cKstj|j|S(N(R<tNotebookR>(RRb((s9/usr/lib64/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(NiRiRR8RRs@20,5s@5,5iids@%d, 5sTab with text 'a' not found(RfRthideRRFRGRttabRgRtindexRtselectRR?R@RRtrangeRHtfail(Rttb_idxti((s9/usr/lib64/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( NiROtunknowntoptionR8RRi(RFRGRRfRiRHRR<R{R>ttabsRgRRkRR(RRtRtcurrt child2_index((s9/usr/lib64/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(NiROi(RFRGRRfRRHRtRkRgt assertNotInRRRRR((RRtt child1_index((s9/usr/lib64/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( RFRGRRfRkRHR R)RRgR(R((s9/usr/lib64/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(RfRtRRRgRRFRGRR<R{R>RRRH(RRtR((s9/usr/lib64/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(RRU(R(R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRRs<>cs jtS(N(RRU(R(t tab_changed(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRR( RfR?R@RgRRRlRRRR(R((RR{s9/usr/lib64/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(NitnotabR8Rtabc( RFRGRRfRjRHR RgR!R(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tab(s%"%cCsb|jt|jjd|jj|j|jj|j|j|jjddS(Ni((RRRfRtRRgR(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tabs6scCs|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 sR8RRgRs s(RfR?R@RlR t focus_forceRRRRRgRjtenable_traversalRR(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_traversal?s*   " " "  (RR]R^R!R.R`R7(R4R5RcR;RRqRwRRzRR|RRR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRes      !   t TreeviewTestc BseZd#Zd Zd ZdZdZdZdZdZ dZ dZ dZ dZ dZdZdZdZdZdZdZdZdZd Zd!Zd"ZRS($RtcolumnsR]tdisplaycolumnsR^R!t selectmodeRR.R`RtyscrollcommandcCs,tt|j|jdd|_dS(NR!i(R:RR;Rttv(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;cscKstj|j|S(N(R<tTreeviewR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRgscCsa|j}|j|dddd |j|dd |j|dtd krVd nd dS(NRsa b cR"RR#RiiR(RR#R(RR#R(ii((RR,R(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_columnsjs  cCs|j}d|d<|j|dddd|j|dd|j|dddd|j|dd|j|ddd d|j|ddd d|j|ddd ddS(NRR#RRRsb a cR"s#alliiiRRsInvalid column index disColumn index 3 out of boundsisColumn index -2 out of bounds(RR#R(R#RR(R#RR(s#all(iii(RR#R(iii(ii(RR,R(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_displaycolumnsqs  c CsN|j}|j|ddddddt|j|ddddtdS( NR^idiit3cR3gLY@gfffffY@(RRGRR (RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs "cCs)|j}|j|dddddS(NRRtbrowsetextended(RRv(RR((s9/usr/lib64/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 headingsR"ttreetheadings(RR(RR(RR(R(R(RR,(RR((s9/usr/lib64/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( NRRittestRR7i2s#0(RR?RRR@RRt get_childrenRRtcolumnRHRR)(Rtitem_idtchildrenRt bbox_column0t root_widthRg((s9/usr/lib64/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(((( RRRRR ttuplet set_childrenRFRGR(RRRR((s9/usr/lib64/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#0R7i t10tidtXRs some valuetunknown_optiontwrongtstretchRtminwidth( R RRR!RRHR)RRFRGR(Rt invalid_kwsRM((s9/usr/lib64/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( RFRGRRRRRRRtreattach(RRtitem2titem1((s9/usr/lib64/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(((( RRRtdetachRRRtmoveRFRGR(RRRtprev((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_detach_reattachs4     cCst|j|jjdt|j|jjdt|j|jjit|jtj|jjddS(Nt somethingR( RRtexistsRRURFRGRRH(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_exists'scCs|j|jjd|jjdd}|jj||j|jj||jj||j|jjd|jtj|jjddS(NRRRO(RRRRRRFRGR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_focus2scCs|j|jjdt|jjddd|j|jjddd|j|jjdddd|jtj|jjddd|jtj|jjddddS(Ns#0R8RORRi( R RtheadingR!RRHRFRGR(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_headingAs"csfd}gjjjjjjddfdjjdddjj|ddsjdngjjj}jjddt jjdddj |jjj|ddsjdndS( Ncs$tj||jjdS(N(R RR(RR(R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pytsimulate_heading_clickRss#0Rcs jtS(N(RRU((R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRZRR7idis>The command associated to the treeview heading wasn't invoked.( RR?R@RRRRnRt _tclCommandsRRHR(RRtcommands((RRs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_heading_callbackQs"    . 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( RFRGRRRkRRRRR(RRRtc1tc2((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRzss&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||jjddd}|j |d|jjddd}|j |d|jtj|jjddt|jtj|jjddddS(NRRRtopentpleasetmiddles first-itemuábaRttagsiiRRs1 2 %ss1 2sa b cs%s %ss{a b c} {%s %s}R8s Label hereiR#gs0.0(ii(RR(RFRGRRRRRRURRRtitemRRHR>t splitlistR R!(RtitemidR-R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_insert_itemsh.. 4$ !!"cCs|jtj|jjd|jtj|jjd|jtj|jjd|jtj|jjd|jjdd}|jjdd}|jj|d}|jj|d}|jj|d}|j |jj d |jj||f|j |jj ||f|jj||j |jj |f|jj||f|j |jj |||f|jj||j |jj ||||f|jj||f|j |jj |||f|jj||j |jj ||f|jj||f|j |jj ||f|jj||j |jj |f|jjdddd|jjd|j |jj d |jjdddd|jjd|j |jj d t rl|jjdddt d|jjt d|j |jj t dfn|jjdddd|jjd|j |jj t rt d ndfdS( NRRRRs with spacess{braces unicode\u20acsbytes€s bytes\u20ac((s with spaces(s{brace( RFRGRRt selection_sett selection_addtselection_removetselection_toggleRRt selectionRR(RRRRRtc3((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_selectionsR"%"%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(NtAtBRRRRRR#sa aRsb ai{t123s123 atnotme(RR(R#R(i{R( RRRRRRHRRFRGR(RR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRWs,!*#"$"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(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR;Rscs jdS(Ni(R(R(R(s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR=Riidi iii(ii(RRttag_bindR?R@RRRmRt identify_rowRRR tzip( RRRtpos_ytfoundRpRRR((Rs9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tag_bind6s2       0cCs|jt|jj|jtj|jjddd|jjddd|jt|jjddd|jt|jjdddd|j |jjdt dS(NRtskytblueR( RFt TypeErrorRt tag_configureRGRRRRHR R!(R((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyttest_tag_configureXs !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( NRRR8sItem 1Rttag1sItem 2ttag2s non-existingttag3(( RRRFRttag_hasRRRR(RRR((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyt test_tag_hasds$$( RRR]RR^R!RRR.R`RR(R4R5RcR;RRRRRRRRRRRRRRRRzRRRWRRR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR[s4           *   "  M 6 ! " t SeparatorTestcBseZdZdZdZRS(RR]R R.R`RcKstj|j|S(N(R<t SeparatorR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyR|s(RR]R R.R`(R4R5RcR/R(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRtst SizegripTestcBseZdZdZRS(RR]R.R`cKstj|j|S(N(R<tSizegripR>(RRb((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRs(RR]R.R`(R4R5RcR(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyRst__main__(5tunittesttTkinterRGRR<ttest.test_supportRRRRRttest_functionsRtsupportRRRR t widget_testsR R R R RRRRRtTestCaseR6RYR[RdR~RRRRRR R,R4R>RXtskipIfRRcReRRRt tests_guiR4(((s9/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pytsr   " ": ';     0| 3 j "