ó {fc@słdZddlmZddlZddlmZddlmZmZm Z ddl m Z dej fd„ƒYZ d ej fd „ƒYZed krŻejd d ƒndS(s5Unittest for idlelib.WidgetRedirector 100% coverage i˙˙˙˙(trequiresN(tFunc(tTktTexttTclError(tWidgetRedirectort InitCloseTestcBs8eZed„ƒZed„ƒZd„Zd„ZRS(cCs9tdƒtƒ|_|jjƒt|jƒ|_dS(Ntgui(RRtroottwithdrawRttext(tcls((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt setUpClasss   cCs|`|jjƒ|`dS(N(R Rtdestroy(R ((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt tearDownClasss cCsbt|jƒ}|j|j|jƒ|j|j|jjƒ|jtt|jƒ|jƒdS(N(RR t assertEqualtwidgetttkt assertRaisesRtclose(tselftredir((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt test_inits cCsYt|jƒ}|jdtƒ|jƒ|j|jiƒ|jt|jdƒƒdS(NtinsertR( RR tregisterRRRt _operationst assertFalsethasattr(RR((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt test_close"s  (t__name__t __module__t classmethodR RRR(((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyR s tWidgetRedirectorTestcBs‰eZed„ƒZed„ƒZd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „ZRS( cCs9tdƒtƒ|_|jjƒt|jƒ|_dS(NR(RRRR RR (R ((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyR ,s   cCs|`|jjƒ|`dS(N(R RR (R ((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyR3s cCsPt|jƒ|_tƒ|_|jjd|jƒ|_|jjddƒdS(NRtasdf(RR RRtfuncRt orig_insertR(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pytsetUp9s cCs$|jjddƒ|jjƒdS(Ns1.0tend(R tdeleteRR(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttearDown?scCs6|jdt|jƒƒ|jdt|jƒƒdS(Nt RedirectortOriginal(tassertIntreprRR#(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt test_reprCscCs~|j|jjddƒdƒ|j|jjdƒ|jd|jjƒ|jd|jjƒ|j|jj |jƒdS(Ns1.0R%s RR!(RR!( RR tgetR"targsR*RRt__dict__R(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt test_registerGs cCsh|j|jjdƒ|j|jj|jjjƒ|jddƒ|j|jjddƒdƒdS(NRR!s1.0R%sasdf (RR#t operationttk_callR RtcallR-(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_original_commandNscCsh|j|jjdƒƒ|j|jjdƒ|jƒ|jd|jjƒ|jd|jjƒdS(Nsinvalid operation nameR( t assertIsNoneRt unregisterRR"t assertNotInRR R/(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_unregisterTscCs,|j`|j|jjdƒ|jƒdS(NR(R RRRR6R"(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_unregister_no_attributeZs cCsG|jjtƒ|j|jjdtƒƒ|j|jjdƒdS(NRi( R"t__init__tTruet assertTrueRtdispatchtFalseRR.(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_dispatch_intercept^scCsU|jddƒ|j|jjdddƒdƒ|j|jjddƒdƒdS(NRR!R&s1.0R%ts (R#RRR=R R-(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_dispatch_bypasscs"cCsR|jjtƒƒ|j|jjdtƒdƒ|j|jjdƒdƒdS(NRR@tinvalid(R"R:RRRR=R>(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_dispatch_erroriscCs|jj|jjddƒ|j|jjdƒ|j|jjddƒdƒ|jjt ƒƒ|j|jj|jjddƒdƒdS( NRthellos1.0R%s tbooR@(RD( RR3R t_wRR"R.R-R:R(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_command_dispatchns (RRRR RR$R'R,R0R4R8R9R?RARCRG(((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyR *s          t__main__t verbosityi(t__doc__ttest.test_supportRtunittesttidlelib.idle_test.mock_idleRtTkinterRRRtidlelib.WidgetRedirectorRtTestCaseRR Rtmain(((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyts Q