ó {fc@s—dZddlZddlmZddlmZmZddlmZdd d„ƒYZ dej fd „ƒYZ e d kr“ej d d ƒndS(s!Unit tests for idlelib.AutoExpandiÿÿÿÿN(trequires(tTexttTk(t AutoExpandt Dummy_EditwincBseZd„ZRS(cCs ||_dS(N(ttext(tselfR((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyt__init__ s(t__name__t __module__R(((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyR stAutoExpandTestcBs\eZed„ƒZed„ƒZd„Zd„Zd„Zd„Zd„Z d„Z RS(cCsedttƒkr=tdƒtƒ|_t|jƒ|_n tƒ|_tt|jƒƒ|_dS(NtTkintertgui( tstrRRRttkRRRt auto_expand(tcls((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyt setUpClasss    cCs5|`|`t|dƒr1|jjƒ|`ndS(NR(RRthasattrRtdestroy(R((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyt tearDownClasss  cCs|jjddƒdS(Ns1.0tend(Rtdelete(R((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyttearDown!scCs|j}|jj}|j}||ƒdƒ|jddƒ||ƒdƒ|jddƒ||ƒdƒ|jddƒ||ƒdƒ|jddƒ||ƒdƒ|jddƒ||ƒd ƒ|jd dƒ||ƒdƒ|jd d ƒ||ƒdƒdS( Nttinsertttthistthist tiss sample stringtstrings3.0s1.0R(RRt getprevwordt assertEqualRR(RRtprevioustequal((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyttest_get_prevword$s$   cCsÂ|jj}|jj}|j}|jjddƒ||jjƒddddgƒ|dƒ||ƒdƒ|dƒ||ƒdƒ|dƒ||ƒdƒ|dƒ||ƒdƒdS(NRsab ac bx ad ab atabtadtactatevent(RR texpand_word_eventR!RRtgetwords(RR"texpandR#((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyttest_before_only@s   "    cCsØ|j}|jj}|jj}|j}|jddƒ|jddƒ||jjƒddddgƒ|dƒ||ƒdƒ|dƒ||ƒdƒ|dƒ||ƒdƒ|dƒ||ƒdƒdS( NRs a, [ab] ac: () bx"" cd ac= ad yas1.1R%R'R&R(R)(RRR R*R!Rtmark_setR+(RRR"R,R#((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyttest_after_onlyPs    "    cCsË|j}|jj}|jj}|j}|jddƒ|jddƒ|jddƒ||jjƒdddgƒ|dƒ||ƒdƒ|dƒ||ƒdƒ|dƒ||ƒdƒdS( NRs ab xy yz s a ac by acs2.1R%R'R(R)(RRR R*R!RR.R+(RRR"R,R#((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyttest_both_before_aftercs       cCsÝ|j}|jj}|j}||jjƒgƒ||dƒdƒ|jddƒ||jjƒgƒ|jddƒ|jddƒ|dƒ|jj}|jddƒ|dƒ|jj}|j||ƒdS(NR)tbreakRs bx cy dz asac xy a ac ad as1.7s1.end( RRR*R!R+RR.tstatetassertNotEqual(RRR,R#t initial_statet new_state((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyttest_other_expand_casesus       ( RR t classmethodRRRR$R-R/R0R6(((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyR s      t__main__t verbosityi((t__doc__tunittestttest.test_supportRR RRtidlelib.AutoExpandRRtTestCaseR Rtmain(((s9/usr/lib64/python2.7/idlelib/idle_test/test_autoexpand.pyts ~