ó zfc@sÍddlZddlZddlZddlZddlmZmZmZddl m Z m Z edƒde ej fd„ƒYZ de ej fd„ƒYZe efZed krÉeeŒndS( iÿÿÿÿN(trequirest run_unittestt swap_attr(tAbstractTkTesttdestroy_default_roottguitLabeledScaleTestcBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs$|jjƒtt|ƒjƒdS(N(troottupdate_idletaskstsuperRttearDown(tself((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyR s cCsltj|jƒ}|jj}|jƒ|jtj|j j |ƒtj |jƒ}|j}tj|jd|ƒ}|jƒ|j r¯|j |j j |ƒ|jƒƒn(|j t|j j |ƒƒ|jƒƒ~|jtj|j j |ƒtj|jƒ}tj|jd|ƒ}|jƒtj|jd|ƒttdƒrh|jtjtjƒndS(Ntvariablet last_type(tttkt LabeledScaleRt _variablet_nametdestroyt assertRaisesttkintertTclErrorttkt globalgetvart DoubleVart wantobjectst assertEqualtgettfloattIntVarthasattrtsystassertNotEqualR (R txtvartmyvartname((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_widget_destroys&     %( c Csšttddƒ‚ttdtƒizYtjƒ}|jtjƒ|j|j tjƒ|j|j tjj ƒ|j ƒWdt ƒXWdQXWdQXdS(Nt _default_roott_support_default_root( RRtNonetTrueRRtassertIsNotNoneR&RtmasterRRR(R R!((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_initialization_no_master2s csôtjˆjƒ}tj|ƒ}ˆj|j|ƒ|jƒddddtj dtj dff}ˆj r}|d7}nxK|D]C}tjˆjd|dƒ}ˆj|j |dƒ|jƒq„Wtjˆjdd ƒ}ˆj t |jjƒ|jƒtjˆjddƒ}ˆj t |jjƒ|jƒtjˆjd d ƒ}tjˆjd |ƒ}ˆj|j dƒ|jƒtjˆjd |dd ƒ}ˆj|j d ƒˆj|jj|jƒ|jƒ‡fd†}tjˆjddƒ}||jd|jdƒ|jƒtjˆjddƒ}||jd|jdƒ|jƒtjˆjddƒ}||jd|jdƒ|jƒtjˆjƒ}||jd|jdƒ|jƒˆj tjtj|ddƒdS(Nt0ii iÿÿÿÿig@itfrom_s2.5tvalueiR gà?cs8ˆj|jƒd|ƒˆj|jƒd|ƒdS(Ntsidetanchor(Rt pack_infot place_info(tscalet scale_postlabelt label_pos(R (s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pytcheck_positionsastcompoundttoptbottomtntstunknowntatb(R-i(ii(i i (iÿÿÿÿiÿÿÿÿ(g@i((g@i(RtFrameRRRRR+RRtmaxintRR/Rt ValueErrorRRR(RRR4R6R(R R+R!tpassed_expectedtpairR#R8((R s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_initialization?sP              cCs^tj|jddddƒ}|jƒ|jƒ|jƒ|jjƒ}|jj ƒd}|j |t |dƒƒ|jj ddddƒ|jƒ|jj ƒd}|j ||ƒ|jjƒ}|j |jd|jrìdnd ƒ|j |t |dƒƒ|jj ddddƒ|j ||ƒ|j |t |dƒƒ|jƒdS( NR.ittoi R!iûÿÿÿittextR-(RRRtpacktwait_visibilitytupdateR6R3R4tcoordsRtintt configureR RR(R tlscaletlinfo_1t prev_xcoordt curr_xcoordtlinfo_2((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_horizontal_rangevs$    &cCsvtj|jƒ}|jƒ|jƒ|jƒ|jjƒd}|jd}||_|jƒ|j |j d|j r‚|n t |ƒƒ|j |jjƒd|ƒ|j |jjƒdt|j jƒdƒƒ|j rñd„}nt}||jdƒd|_|jƒ|j ||j dƒ|ƒ|j |jjƒdt|j jƒdƒƒ|jƒdS(NiiRHR!cSs|S(N((R!((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyt¨tRG(RRRRIRJRKR4RLR/RR6Rtstrt assertGreaterRMR3R(R R!RRtnewvaltconv((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_variable_change”s,         cCsõtj|jƒ}|jdtddƒ|jƒ|jƒ|jjƒ|jj ƒ}}|d|d}}d|_ |jƒ|jj d||fƒ|j t |jjƒdƒ|jjƒdƒ|jj d||fƒ|jƒdS( Ntexpandtfilltbothiis%dx%dR!i(RRRRIR)RJRKR+t winfo_widtht winfo_heightR/t wm_geometryRRMR6R3R4RLR(R R!twidththeightt width_newt height_new((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyt test_resize´s    ( t__name__t __module__R R%R,RFRTR[Rf(((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyR s  " 7  tOptionMenuTestcBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs,tt|ƒjƒtj|jƒ|_dS(N(R RitsetUpRt StringVarRttextvar(R ((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyRjÊscCs|`tt|ƒjƒdS(N(RlR RiR (R ((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyR ÎscCs‰tj|jƒ}tj|j|ƒ}|j}|jƒ|jƒ|j|j j |ƒ|j ƒƒ~|j tj |j j |ƒdS(N(RRkRRt OptionMenuRRRRRRRRR(R R"toptmenuR$((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyR%Ós   "cCs’|jtjtj|j|jddƒtj|j|jdddƒ}|j|jj ƒdƒ|j |dƒ|j |dƒ|j ƒdS(NtinvalidtthingR@R?tmenut textvariable( RRRRRmRRlRRRt assertTrueR(R Rn((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyRFÞs !c s7d ‰d}tjˆjˆj|ˆŒ}t}xYttˆƒƒD]E}|dj|dƒ}ˆj|ˆ|ƒ||krCt }qCqCWˆj |ƒ|j ƒd}tjˆjˆj|ˆŒ}d}d}xQt r&||dj |dƒ}}||kr Pnˆj||ƒ|d7}qÖWˆj|tˆƒƒ|jƒ|jƒ|djdƒˆj|jjƒˆdƒˆjtj|djd ƒˆj|jjƒˆdƒ|j ƒg‰‡‡‡fd †}tjˆjˆjdd |ˆŒ}|djdƒˆs)ˆjd ƒn|j ƒdS(NR?R@tcRqR/tdiiiÿÿÿÿcs%ˆj|ˆdƒˆjtƒdS(Ni(RtappendR)(titem(titemsR tsuccess(s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pytcb_teststcommandsMenu callback not invoked(R?R@Rt(RRmRRltFalsetrangetlent entrycgetRR)RsRR(tentryconfigureR RIRJtinvokeRRRRRtfail( R tdefaultRnt found_defaulttiR/tcurrtlastRz((RxR Rys</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyt test_menuësJ          cCs;d }d}tj|j|j||Œ}tj|jƒ}tj|j|||Œ}|jƒ|jƒ|jƒ|jƒ|djdƒ|djdƒ|dj ddƒ}|dj ddƒ}|j ||ƒ|j |jj j |ƒ|dƒ|j |jj j |ƒ|dƒ|jƒ|jƒdS( NR?R@RtRqiiiR (R?R@Rt(RRmRRlRRkRIRJRRR RRRR(R RxRƒRnttextvar2toptmenu2toptmenu_stringvar_nametoptmenu2_stringvar_name((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyttest_unique_radiobuttonss*        (RgRhRjR R%RFRˆR(((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyRiÈs    4t__main__(RtunittesttTkinterRRttest.test_supportRRRttest_ttk.supportRRtTestCaseRRit tests_guiRg(((s</usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyts     ¾q