ó {fc@s£ddlZddlmZddlmZdefd„ƒYZdeejfd„ƒYZdeejfd „ƒYZ e d krŸej d d d e ƒndS(iÿÿÿÿN(trequires(tTclErrortTextTestcBseZdZedZd Zd„Zd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „ZRS(s hello worlds cCs|jƒ|_dS(N(tTextttext(tself((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pytsetUp scCs<|j|jjdƒdƒ|j|jjdƒdƒdS(Ns1.0s tendt(t assertEqualRtget(R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyt test_initscCs^|jj}x$dD]}|j||ƒdƒqWx$dD]}|j||ƒd ƒq:WdS(Ngð¿g333333Ó?s1.-1s1.0s 1.0 lineends1.ends1.33tinsertRg@s2.1s33.44s2.0(gð¿g333333Ó?s1.-1s1.0s 1.0 lineends1.ends1.33R (Rg@s2.1s33.44(RtindexR (RR tdex((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_index_emptys    cCs›|jj}|jjd|jƒx$d D]}|j||ƒdƒq)Wx$d D]}|j||ƒdƒqPWx$dD]}|j||ƒd ƒqwWdS(Ns1.0gð¿g333333Ó?s1.-1s 1.0 lineends1.ends1.33s1.5Rs33.44s3.0(gð¿g333333Ó?s1.-1s1.0(s 1.0 lineends1.ends1.33(Rs33.44(RR R thwR (RR R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_index_datas    cCsM|jj}|j}|jjd|jƒ||dƒdƒ||ddƒdƒ||dƒdƒ||ddƒdƒ||ddƒdƒ||ddƒdƒ||dd ƒd ƒ||dd ƒd ƒ||d ƒd ƒ||dd ƒdƒ||ddƒ|jƒ||ddƒ|jƒ||ddƒ|jƒdS(Ns1.0RRths1.1s1.3theltels 1.0 lineendthellos1.10s s2.3sello wors2.5s0.0s5.0(RR R R Rthwn(RR tEqual((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_get+s   cCs#|jj}|jj}|j}|d|jƒ||ddƒ|jƒ|ddƒ||ddƒ|jƒ|ddƒ||ddƒdƒ|ddƒ||ddƒdƒ|ddƒ||ddƒd ƒ|dd ƒ||ddƒd ƒ|d d ƒ||ddƒdƒdS(Ns1.0RRt*s *hello world s 1.0 lineends*hello* world s2.3s*hello* wor*ld txs*hello* wor*ldx s1.4sx s*helx lo* wor*ldx (RR R R RR(RR R R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyt test_insert>s"         cCs|jj}|jj}|j}|jjd|jƒ|dƒ||ddƒ|jƒ|dƒ||ddƒ|jƒ|ddƒ||ddƒ|jƒ|ddƒ||ddƒ|jƒ|ddƒ||ddƒ|jƒ|ddƒ||ddƒ|jƒdS(Ns1.0R Rs5.5s1.4(RtdeleteR R R RR(RRR R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_no_deleteXs          cCs|jj}|jj}|j}|jjd|jƒ|dƒ||ddƒdƒ|ddƒ||ddƒdƒ|dƒ||ddƒdƒ|jjddƒ|d ƒ||ddƒdƒ|jjddƒ|dd ƒ||ddƒdƒdS( Ns1.0s1.endtellos1.1tllotlloworlds1.3s s1.10s2.0(RRR R R R(RRR R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_delete_charqs         cCs|jj}|jj}|j}|jjd|jƒ|ddƒ||ddƒdƒ|ddƒ||ddƒdƒ|jjd|jƒ|ddƒ||ddƒdƒ|ddƒ||ddƒdƒ|jjd|jƒ|dd ƒ||ddƒd ƒdS( Ns1.0s 1.0 lineendRs world s s2.0sworld s1.2s2.3sheld (RRR R R R(RRR R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_delete_slice‰s         cCs{|jjddƒ|jjddƒ|j|jjddƒdƒ|jjddƒ|j|jjddƒdƒdS( Ns1.0Rs1.3s 1 2 3 4 5Rshel1 2 3 4 5lo s5.1shello (RR R R R(R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyttest_multiple_lines s c Csr|jj}|j}|jjddƒ|jt|dddƒx*dtttttfdtttttfdtttttfdtttttfd tttttfd tttttffD]¤\}}}}}}||d |dƒ||ƒ||d |dƒ||ƒ||d|dƒ||ƒ||d |dƒ||ƒ||d|dƒ||ƒqÆWdS(Ns1.0sFirst Second Third s2.2topts>=s==s!=s1.1s2.1s2.3s3.3(RtcompareR R t assertRaisesRtTruetFalse( RR'RR$tless1tless0tequaltgreater0tgreater1((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyt test_compare©s   1N(t__name__t __module__RRtNoneRRR RRRRRR!R"R#R0(((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyRs         t MockTextTestcBs eZed„ƒZd„ZRS(cCsddlm}||_dS(Niÿÿÿÿ(R(tidlelib.idle_test.mock_tkR(tclsR((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyt setUpClassÂscCs‡|jj}|j}|jjd|jƒ||ddƒd ƒ||ddƒd ƒ||ddƒd ƒ||ddƒd ƒdS( Ns1.0Riÿÿÿÿiis3.1ii(ii(ii(ii(ii(Rt_decodeR R R(RtdecodeR((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyt test_decodeÇs  (R1R2t classmethodR7R:(((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyR4Àst TkTextTestcBs&eZed„ƒZed„ƒZRS(cCs9tdƒddlm}m}||_|ƒ|_dS(Ntguiiÿÿÿÿ(tTkR(RtTkinterR>Rtroot(R6R>R((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyR7Õs  cCs|jjƒ|`dS(N(R@tdestroy(R6((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyt tearDownClassÜs (R1R2R;R7RB(((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyR<Óst__main__t verbosityitexit( tunittestttest.test_supportRt_tkinterRtobjectRtTestCaseR4R<R1tmainR*(((s3/usr/lib64/python2.7/idlelib/idle_test/test_text.pyts ¹