{G_Tc@sVddlZddlZddlZddlmZmZddlmZmZm Z m Z m Z ddl Z eZZe dddfkreZneoeeZdZeZe d dddfkreZneZd efd YZd efd YZd efdYZdefdYZdZdZdS(iN(t setup_mastertScale(t tcl_versiont requires_tcltget_tk_patchlevelt pixels_convt tcl_obj_eqiii cCstt|S(N(tinttround(tx((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt int_roundsitAbstractWidgetTestcBseZeeZdZeZdZ dZ dZ dZ de jdZeeddZdedZdZdZd Zd Zdd Zd Zd ZdZdZdZdZdZdZ RS(cCsIt|_t|jjdd|_|jjsEt|_ndS(Nttktscaling(RtroottfloattcallR t wantobjectstFalse(tself((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pytsetUp"s cCs(x!|jjD]}|jqWdS(N(Rtwinfo_childrentdestroy(Rtw((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttearDown(scCsK|jrtdkr|St|trAdjt|j|St|S(Niit (ii(RRt isinstancettupletjointmapt_strtstr(Rtvalue((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyR,s cKs#|j|}|j|j|S(N(t_createt addCleanupR(Rtkwargstwidget((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pytcreate3scCs*|||rdS|j|||dS(N(t assertEqual(Rtactualtexpectedtmsgteq((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt assertEqual28scCs|||<|tkr|}n|r4||}n|jsmt|tr^tj|}qmt|}n|dkrt}n|j |||d||j |j ||d|t|t s |j |}|j t|d|j |d|d|ndS(NR*ii(t _sentinelRRRtTkintert_joinRtNoneRR+tcgetRt configureR&tlen(RR$tnameR R(tconvR*tt((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt checkParam=s"      c Cs||}|dk r(|j|}n|jtj}|||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(ctactivebackgroundtactiveborderwidthtactiveforegroundtanchort backgroundtbitmapt borderwidthtcompoundtcursortdisabledforegroundtexportselectiontfontt foregroundthighlightbackgroundthighlightcolorthighlightthicknessRstinsertbackgroundtinsertborderwidtht insertofftimet insertontimet insertwidthtjumptjustifytorienttpadxtpadytrelieft repeatdelaytrepeatintervaltselectbackgroundtselectborderwidthtselectforegroundtsetgridt takefocusttextt textvariablet troughcolort underlinet wraplengthtxscrollcommandtyscrollcommandcCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_activebackgrounds c Cs2|j}|j|ddddddddS(NRig?g333333@iiRC(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_activeborderwidths  cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_activeforegrounds c Cs;|j}|j|ddddddddd d dS( NRtntnetetsetstswRtnwtcenter(R%Re(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_anchors  cCsB|j}|j|dd|jkr>|j|dndS(NRtbg(R%RWtOPTIONS(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_background s cCs|j}|j|dd|j|ddtjjddd}|j|dd|d|jjjd d kod |jjks|j |dd d dndS(NRt questheadtgray50s python.xbmtsubdirt imghdrdatat@taquaR twindowingsystemtAppKitRER;sbitmap "spam" not defined( R%R6ttestt test_supporttfindfileRR Rt winfo_serverR?(RR$tfilename((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_bitmaps c Csf|j}|j|dddddddd|jkrb|j|dddddddndS( NRig?g@iiRCtbd(R%RiR(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_borderwidths   c Cs2|j}|j|ddddddddS(NRtbottomRtleftR[trightttop(R%Re(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_compound&s  cCs |j}|j|ddS(NR(R%R\(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_cursor+s cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_disabledforeground/s cCs |j}|j|ddS(NR(R%RO(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_exportselection3s cCs<|j}|j|dd|j|dddddS(NRs3-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*RBR;sfont "" doesn't exist(R%R6R?(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_font7s   cCsB|j}|j|dd|jkr>|j|dndS(NRtfg(R%RWR(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_foreground>s cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_highlightbackgroundDs cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_highlightcolorHs cCsQ|j}|j|dddddd|j|ddddd |jdS( NRig?g@iRCiR(R4(R%RiR6Rg(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_highlightthicknessLs   tdarwins"crashes with Cocoa Tk (issue19733)cCs |j}|j|ddS(NRs(R%Rt(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_imageSs cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_insertbackgroundYs c Cs2|j}|j|ddddddddS(NRig?g@iiRC(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_insertborderwidth]s  cCs#|j}|j|dddS(NRid(R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_insertofftimebs cCs#|j}|j|dddS(NRid(R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_insertontimefs cCs,|j}|j|ddddddS(NRg?g@iRC(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_insertwidthjs cCs |j}|j|ddS(NR(R%RO(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_jumpns cCsH|j}|j|dddddd|j|dddddS( NRRRRR;s6bad justification "{}": must be left, right, or centerRBs:ambiguous justification "": must be left, right, or center(R%ReR?(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_justifyrs  cCsC|j}|jt|d|j|j|ddddS(NRt horizontaltvertical(R%R&Rtdefault_orientRe(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_orient{s c Cs8|j}|j|ddddddd|jdS(NRig@gffffff@it12mR4(R%RiR(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_padxs c Cs8|j}|j|ddddddd|jdS(NRig@gffffff@iRR4(R%RiR(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_padys cCs |j}|j|ddS(NR(R%Rp(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_reliefs cCs&|j}|j|ddddS(NRi i(R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_repeatdelays cCs&|j}|j|ddddS(NRi i(R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_repeatintervals cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_selectbackgrounds cCs,|j}|j|ddddddS(NRg?g@iRC(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_selectborderwidths cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_selectforegrounds cCs |j}|j|ddS(NR(R%RO(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_setgrids cCs)|j}|j|dddddS(Ntstatetactivetdisabledtnormal(R%Re(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_states cCs)|j}|j|dddddS(NRt0t1RB(R%RA(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_takefocuss cCs&|j}|j|ddddS(NRRBs any string(R%RA(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_texts cCs/|j}tj}|j|d|dS(NR(R%R-t StringVarRv(RR$Ru((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_textvariables  cCs |j}|j|ddS(NR(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_troughcolors cCs)|j}|j|dddddS(NRiii (R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_underlines cCs#|j}|j|dddS(NRid(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_wraplengths cCs |j}|j|ddS(NR(R%R`(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_xscrollcommands cCs |j}|j|ddS(NR(R%R`(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_yscrollcommands cCs |j}|j|ddS(NR^(R%R`(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_commands cCs |j}|j|ddS(Nt indicatoron(R%RO(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_indicatorons cCs |j}|j|ddS(Nt offrelief(R%Rp(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_offreliefs cCs |j}|j|ddS(Nt overrelief(R%Rp(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_overreliefs cCs |j}|j|ddS(Nt selectcolor(R%RW(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_selectcolors cCs |j}|j|ddS(Nt selectimage(R%Rt(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_selectimages iicCs |j}|j|ddS(Nt tristateimage(R%Rt(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_tristateimages cCs#|j}|j|dddS(Nt tristatevaluet unknowable(R%R6(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyttest_tristatevalues cCs/|j}tj}|j|d|dS(Ntvariable(R%R-t DoubleVarRv(RR$Ru((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_variables  (*sactivebackgroundsactiveborderwidthsactiveforegroundsanchors backgroundsbitmaps borderwidthscompoundscursorsdisabledforegroundsexportselectionsfonts foregroundshighlightbackgroundshighlightcolorshighlightthicknesssimagesinsertbackgroundsinsertborderwidths insertofftimes insertontimes insertwidthsjumpsjustifysorientspadxspadysreliefs repeatdelaysrepeatintervalsselectbackgroundsselectborderwidthsselectforegroundssetgrids takefocusstexts textvariables troughcolors underlines wraplengthsxscrollcommandsyscrollcommand(<R}R~tSTANDARD_OPTIONSRRRRRRRRRRRRRRRRtunittesttskipIftsystplatformRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR R RRRR(((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyRs                                              tIntegerSizeTestscBseZdZdZRS(cCs)|j}|j|dddddS(Ntheightidii(R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_heights cCs)|j}|j|dddddS(Ntwidthiini(R%RD(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt test_widths (R}R~RR(((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyRs tPixelSizeTestscBseZdZdZRS(c Cs2|j}|j|ddddddddS(NRidgLY@gfffffY@iit3c(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyRs c Cs2|j}|j|ddddddddS(NRigfffff6y@gIy@init5i(R%Ri(RR$((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyRs (R}R~RR(((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyRs 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(R%tAssertionErrorR}(RtoptionR$(tcls(s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyRs (Rthasattrtsetattrtgetattrtim_funcR}(R%R$t methodnamet source_classR(tsource_classes(R%s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt decorator s    ((R,R-((R,s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pytadd_standard_options scCs4tjjr0tj}dG|jddGHndS(Ns patchlevel =tinfot patchlevel(RRtverboseR-tTclR(ttcl((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyt setUpModule s  (RRR-tttkRRttest_ttk.supportRRRRRttest.test_supportRRtnoconvt noconv_methRRR RRRR,R RRRR.R4(((s4/usr/local/lib/python2.7/lib-tk/test/widget_tests.pyts*   (