zfc@sVddlZddlZddlZddlmZddlmZmZm Z m Z m Z m Z ddl ZeZZe dddfkreZneoeeZdZeZe d dddfkreZneZd efd YZd efd YZd efdYZdefdYZdZdZdS(iN(tScale(tAbstractTkTestt tcl_versiont requires_tcltget_tk_patchlevelt pixels_convt tcl_obj_eqiii cCstt|S(N(tinttround(tx((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt int_roundsitAbstractWidgetTestcBseZeeZdZeZe dZ dZ de j dZeeddZdedZdZdZdZdZdd Zd Zd Zd Zd ZdZdZdZdZdZ RS(cCsEy |jSWn3tk r@t|jjdd|_|jSXdS(Nttktscaling(t_scalingtAttributeErrortfloattroottcall(tself((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR "s   cCsU|j r#|jr#tdkr#|St|trKdjt|j|St|S(Niit (ii( t _stringifyt wantobjectsRt isinstancettupletjointmapt_strtstr(Rtvalue((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR*s cCs*|||rdS|j|||dS(N(t assertEqual(Rtactualtexpectedtmsgteq((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt assertEqual21scCs|||<|tkr|}n|r4||}n|jsG|j rwt|trhtj|}qwt|}n|dkrt }n|j |||d||j |j ||d|t|t s|j |}|jt|d|j |d|d|ndS(NR"ii(t _sentinelRRRRttkintert_joinRtNoneRR#tcgetRt configureRtlen(RtwidgettnameRR tconvR"tt((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt checkParam6s"     c Cs||}|dk r(|j|}n|jtj}|||RARJRRRWR[R`RdRkRpRrRxR(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR s0            tStandardOptionsTestsc*BseZdbZd*Zd+Zd,Zd-Zd.Zd/Zd0Z d1Z d2Z d3Z d4Z d5Zd6Zd7Zd8Zd9Zejejd:kd;d<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZ dFZ!dGZ"dHZ#dIZ$dJZ%dKZ&dLZ'dMZ(dNZ)dOZ*dPZ+dQZ,dRZ-dSZ.dTZ/dUZ0dVZ1dWZ2dXZ3dYZ4dZZ5d[Z6d\Z7e8d]d^d_Z9e8d]d^d`Z:daZ;RS(ctactivebackgroundtactiveborderwidthtactiveforegroundtanchorR{tbitmapRytcompoundtcursortdisabledforegroundtexportselectiontfontR}thighlightbackgroundthighlightcolorthighlightthicknessRotinsertbackgroundtinsertborderwidtht insertofftimet insertontimet insertwidthtjumptjustifytorienttpadxtpadytrelieft repeatdelaytrepeatintervaltselectbackgroundtselectborderwidthtselectforegroundtsetgridt takefocusttextt textvariablet troughcolort underlinet wraplengthtxscrollcommandtyscrollcommandcCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_activebackground s c Cs2|j}|j|ddddddddS(NRig?g333333@iiR=(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_activeborderwidths  cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_activeforegrounds c Cs;|j}|j|ddddddddd d dS( NRtntnetetsetstswtwtnwtcenter(RR`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_anchors  cCsB|j}|j|dd|jkr>|j|dndS(NR{R|(RRRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_backgrounds cCs|j}|j|dd|j|ddtjjddd}|j|dd|d|jjjd d kod |jjks|j |dd d dndS(NRt questheadtgray50s python.xbmtsubdirt imghdrdatat@taquaR twindowingsystemtAppKitR?R4sbitmap "spam" not defined( RR/RRtfindfileRR Rt winfo_serverR8(RR+tfilename((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_bitmap%s c Csf|j}|j|dddddddd|jkrb|j|dddddddndS( NRyig?g@iiR=Rz(RRdR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_borderwidth2s   c Cs2|j}|j|ddddddddS(NRtbottomRtleftRVtrightttop(RR`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_compound9s  cCs |j}|j|ddS(NR(RRW(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_cursor>s cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_disabledforegroundBs cCs |j}|j|ddS(NR(RRJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_exportselectionFs cCs<|j}|j|dd|j|dddddS(NRs3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*R<R4sfont "" doesn't exist(RR/R8(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_fontJs   cCsB|j}|j|dd|jkr>|j|dndS(NR}R~(RRRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_foregroundQs cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_highlightbackgroundWs cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_highlightcolor[s cCsQ|j}|j|dddddd|j|ddddd |jdS( NRig?g@iR=iR R-(RRdR/Rb(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_highlightthickness_s   tdarwins"crashes with Cocoa Tk (issue19733)cCs |j}|j|ddS(NRo(RRp(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_imagefs cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertbackgroundls c Cs2|j}|j|ddddddddS(NRig?g@iiR=(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertborderwidthps  cCs#|j}|j|dddS(NRid(RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertofftimeus cCs#|j}|j|dddS(NRid(RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertontimeys cCs,|j}|j|ddddddS(NRg?g@iR=(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_insertwidth}s cCs |j}|j|ddS(NR(RRJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_jumps cCsH|j}|j|dddddd|j|dddddS( NRRRRR4s6bad justification "{}": must be left, right, or centerR<s:ambiguous justification "": must be left, right, or center(RR`R8(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_justifys  cCsC|j}|jt|d|j|j|ddddS(NRt horizontaltvertical(RRRtdefault_orientR`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_orients c Cs8|j}|j|ddddddd|jdS(NRig@gffffff@it12mR-(RRdR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_padxs c Cs8|j}|j|ddddddd|jdS(NRig@gffffff@iRR-(RRdR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_padys cCs |j}|j|ddS(NR(RRk(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_reliefs cCs&|j}|j|ddddS(NRi i(RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_repeatdelays cCs&|j}|j|ddddS(NRi i(RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_repeatintervals cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectbackgrounds cCs,|j}|j|ddddddS(NRg?g@iR=(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectborderwidths cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectforegrounds cCs |j}|j|ddS(NR(RRJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_setgrids cCs)|j}|j|dddddS(Ntstatetactivetdisabledtnormal(RR`(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_states cCs)|j}|j|dddddS(NRt0t1R<(RR;(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_takefocuss cCs&|j}|j|ddddS(NRR<s any string(RR;(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_texts cCs5|j}tj|j}|j|d|dS(NR(RR%t StringVarRRr(RR+Rq((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_textvariables cCs |j}|j|ddS(NR(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_troughcolors cCs)|j}|j|dddddS(NRiii (RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_underlines cCs#|j}|j|dddS(NRid(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_wraplengths cCs |j}|j|ddS(NR(RR[(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_xscrollcommands cCs |j}|j|ddS(NR(RR[(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_yscrollcommands cCs |j}|j|ddS(NRY(RR[(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_commands cCs |j}|j|ddS(Nt indicatoron(RRJ(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_indicatorons cCs |j}|j|ddS(Nt offrelief(RRk(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_offreliefs cCs |j}|j|ddS(Nt overrelief(RRk(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_overreliefs cCs |j}|j|ddS(Nt selectcolor(RRR(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectcolors cCs |j}|j|ddS(Nt selectimage(RRp(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_selectimages iicCs |j}|j|ddS(Nt tristateimage(RRp(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_tristateimages cCs#|j}|j|dddS(Nt tristatevaluet unknowable(RR/(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyttest_tristatevalues cCs5|j}tj|j}|j|d|dS(Ntvariable(RR%t DoubleVarRRr(RR+Rq((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_variables (*RRRRR{RRyRRRRRR}RRRRoRRRRRRRRRRRRRRRRRRRRRRRRR(<RRtSTANDARD_OPTIONSRRRRRRRRRRRRRRRRtunittesttskipIftsystplatformRRRRRRRRRRRRRRRRRRRRRRRR R R R R RRRRRRRRR(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyRs                                              tIntegerSizeTestscBseZdZdZRS(cCs)|j}|j|dddddS(Ntheightidii(RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_height s cCs)|j}|j|dddddS(Ntwidthiini(RR>(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt test_width s (RRR'R)(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR%s tPixelSizeTestscBseZdZdZRS(c Cs2|j}|j|ddddddddS(NR&idgLY@gfffffY@iit3c(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR's c Cs2|j}|j|ddddddddS(NR(igfffff6y@gIy@init5i(RRd(RR+((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR)s (RRR'R)(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR*s csfd}|S(NcsxjD]}d|}t|s xkD]5}t||r0t|t||jPq0q0W|fd}||_t||q q WS(Nttest_cs1|j}||td|jfdS(NsOption "%s" is not tested in %s(RtAssertionErrorR(RtoptionR+(tcls(s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyR)s (Rthasattrtsetattrtgetattrtim_funcR(R0R/t methodnamet source_classR(tsource_classes(R0s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt decorators    ((R7R8((R7s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pytadd_standard_optionsscCs4tjjr0tj}dG|jddGHndS(Ns patchlevel =tinfot patchlevel(RRRR%tTclR(ttcl((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyt setUpModule3s  (R!R#tTkinterR%tttkRttest_ttk.supportRRRRRRttest.test_supportRRHtnoconvt noconv_methRRR RRRR$R RR%R*R9R>(((s0/usr/lib64/python2.7/lib-tk/test/widget_tests.pyts*   .