ó žßjc@szdZddlmZddlZddlZddlmZdejfd„ƒYZ e dkrvej dd ƒndS( sTTest (selected) IDLE Edit menu items. Edit modules have their own test files files i˙˙˙˙(trequiresN(tPyShellt PasteTestcBsbeZdZed„ƒZed„ƒZd„Zd„Zd„Zd„Z d„Z d„Z RS( seTest pasting into widgets that allow pasting. On X11, replacing selections requires tk fix. cCs…tdƒtjƒ|_}|jƒtj|ƒtj|ƒ|_tj |ƒ|_ tj |ƒ|_ |j ƒ|jdƒdS(Ntguittwo(RttktTktroottwithdrawRt fix_x11_pastetTextttexttEntrytentrytSpinboxtspintclipboard_cleartclipboard_append(tclsR((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyt setUpClasss    cCsP|`|`|`|jjƒ|jjƒ|jjƒ|jjƒ|`dS(N(R R RRRtupdate_idletaskstupdatetdestroy(R((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyt tearDownClasss     cCse|j}d\}}|jddƒ|jdd|ƒ|jdƒ|j|jddƒ|ƒdS( s+Test pasting into text without a selection.tsonetwo s1.0tendtones <>N(Rsonetwo (R tdeletetinserttevent_generatet assertEqualtget(tselfR ttagtans((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyttest_paste_text_no_selection&s    cCse|j}d\}}|jddƒ|jdd|ƒ|jdƒ|j|jddƒ|ƒdS( s(Test pasting into text with a selection.tselstwo s1.0RRs <>N(R$stwo (R RRRRR(R R R!R"((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyttest_paste_text_selection/s    cCsl|j}d\}}|jddƒ|jddƒ|jd|ƒ|jdƒ|j|jƒ|ƒdS(s/Test pasting into an entry without a selection.itonetwoRRs <>N(iR&(R RRt select_rangeRRR(R R RR"((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyttest_paste_entry_no_selection8s   cCsl|j}d\}}|jddƒ|jddƒ|jd|ƒ|jdƒ|j|jƒ|ƒdS(s,Test pasting into an entry with a selection.RRiRs <>N(RR(R RRR'RRR(R R RR"((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyttest_paste_entry_selectionDs   cCso|j}d\}}|jddƒ|jddƒ|jdd|ƒ|jdƒ|j|jƒ|ƒdS( s0Test pasting into a spinbox without a selection.iR&RRtranges <>N(iR&(RRRt selectionRRR(R RRR"((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyttest_paste_spin_no_selectionNs   cCso|j}d\}}|jddƒ|jddƒ|jdd|ƒ|jdƒ|j|jƒ|ƒdS( s-Test pasting into a spinbox with a selection.RRiRR*s <>N(RR(RRRR+RRR(R RRR"((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyttest_paste_spin_selectionYs   ( t__name__t __module__t__doc__t classmethodRRR#R%R(R)R,R-(((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyR s  t__main__t verbosityi( R0ttest.test_supportRtTkinterRtunittesttidlelibRtTestCaseRR.tmain(((sD/opt/alt/python27/lib64/python2.7/idlelib/idle_test/test_editmenu.pyts  Y