
    /hh
                         S r SSKJr  \" S5        SSKrSSKJr  SSKrSSKJr   " S S\R                  5      r
\S	:X  a  \R                  " S
S9  gg)zNTest (selected) IDLE Edit menu items.

Edit modules have their own test files
    )requiresguiN)ttk)pyshellc                   J    \ rS rSrSr\S 5       r\S 5       rS rS r	S r
Srg	)
	PasteTest   z]Test pasting into widgets that allow pasting.

On X11, replacing selections requires tk fix.
c                    [         R                  " 5       =U l        nU R                  R                  5         [        R
                  " U5        [         R                  " U5      U l        [         R                  " U5      U l	        [        R                  " U5      U l        [         R                  " U5      U l        UR                  5         UR                  S5        g )Ntwo)tkTkrootwithdrawr   fix_x11_pasteTexttextEntryentryr   tentrySpinboxspinclipboard_clearclipboard_append)clsr   s     H/opt/python-3.13.8/usr/lib/python3.13/idlelib/idle_test/test_editmenu.py
setUpClassPasteTest.setUpClass   s    %%'!4d#774=HHTN	YYt_
::d#e$    c                     U ? U ?U ?U R                  R	                  5         U R                  R                  5         U R                  R                  5         U ?g )N)r   r   r   r   r   update_idletasksdestroy)r   s    r   tearDownClassPasteTest.tearDownClass   sD    Hci  "!!#Hr   c                 6   U R                   nS Hu  u  p#U R                  X#S9   UR                  SS5        UR                  SSU5        UR	                  S5        U R                  UR                  SS5      U5        SSS5        Mw     g! , (       d  f       M  = f)z4Test pasting into text with and without a selection.)) zonetwo
)selztwo
)tagansz1.0endone	<<Paste>>N)r   subTestdeleteinsertevent_generateassertEqualget)selfr   r'   r(   s       r   test_paste_textPasteTest.test_paste_text%   s{    yy:HC#/E5)E5#.##K0  %!7=	 0/ ;//s   AB		
B	c                 |   U R                   U R                  4 H  nS H  u  p#U R                  XUS9   UR                  SS5        UR	                  SS5        UR                  SU5        UR                  S5        U R                  UR                  5       U5        SSS5        M     M     g! , (       d  f       M  = f)z8Test pasting into an entry with and without a selection.)r   onetwo)r)   r   )r   r)   r(   r   r)   r*   r+   N)	r   r   r,   r-   r.   select_ranger/   r0   r1   )r2   r   r)   r(   s       r   test_paste_entryPasteTest.test_paste_entry/   s     ZZ,E9\\C\@LLE*LLE*&&q#.((5$$UYY[#6 A@ : -@@s   A(B,,
B;c                 V   U R                   nS H  u  p#U R                  X#S9   UR                  SS5        UR                  SS5        UR	                  SSU5        UR                  S5        U R                  UR                  5       U5        SSS5        M     g! , (       d  f       M  = f)	z9Test pasting into a spinbox with and without a selection.r6   )r)   r(   r   r)   r*   ranger+   N)r   r,   r-   r.   	selectionr/   r0   r1   )r2   r   r)   r(   s       r   test_paste_spinPasteTest.test_paste_spin<   s     yy5HC#/Au%Au%w3/##K0  S1 0/ 6//s   A)B
B(	 N)__name__
__module____qualname____firstlineno____doc__classmethodr   r"   r3   r9   r>   __static_attributes__r@   r   r   r   r      s>     	% 	%  >7
2r   r   __main__   )	verbosity)rE   test.supportr   tkinterr   r   unittestidlelibr   TestCaser   rA   mainr@   r   r   <module>rQ      sP    "     :2!! :2z zMMA r   