7ec@sdZddlmZddlZddlmZddlmZmZm Z ddl m Z dej fdYZ d ej fd YZed krejd d ndS(s5Unittest for idlelib.WidgetRedirector 100% coverage i(trequiresN(tFunc(tTktTexttTclError(tWidgetRedirectort InitCloseTestcBs8eZedZedZdZdZRS(cCs9tdt|_|jjt|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|jdS(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|jddS(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 tWidgetRedirectorTestcBseZedZedZdZdZdZdZdZ dZ dZ d Z d Z d Zd ZRS( cCs9tdt|_|jjt|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|_|jjdddS(NRtasdf(RR RRtfuncRt orig_insertR(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pytsetUp9s cCs$|jjdd|jjdS(Ns1.0tend(R tdeleteRR(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttearDown?scCs6|jdt|j|jdt|jdS(Nt RedirectortOriginal(tassertIntreprRR#(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyt test_reprCscCs~|j|jjddd|j|jjd|jd|jj|jd|jj|j|jj |jdS(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|jjddddS(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|jjdS(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|jdS(NR(R RRRR6R"(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_unregister_no_attributeZs cCsG|jjt|j|jjdt|j|jjddS(NRi( R"t__init__tTruet assertTrueRtdispatchtFalseRR.(R((s:/usr/lib64/python2.7/idlelib/idle_test/test_widgetredir.pyttest_dispatch_intercept^scCsU|jdd|j|jjdddd|j|jjddddS(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|jjdtd|j|jjdddS(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|jjddd|jjt |j|jj|jjddddS( 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