HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/idlelib/idle_test/__pycache__/test_editmenu.cpython-310.pyc
o

�i
�@sndZddlmZed�ddlZddlmZddlZddlmZGdd�dej	�Z
ed	kr5ejd
d�dSdS)zNTest (selected) IDLE Edit menu items.

Edit modules have their own test files
�)�requiresZguiN)�ttk)�pyshellc@s@eZdZdZedd��Zedd��Zdd�Zdd	�Zd
d�Z	dS)
�	PasteTestzeTest pasting into widgets that allow pasting.

    On X11, replacing selections requires tk fix.
    cCsht��|_}|j��t�|�t�|�|_t�|�|_	t
�|�|_t�|�|_
|��|�d�dS)N�two)�tkZTk�rootZwithdrawrZ
fix_x11_pasteZText�textZEntry�entryr�tentryZSpinbox�spin�clipboard_clearZclipboard_append)�clsr�r�</usr/local/lib/python3.10/idlelib/idle_test/test_editmenu.py�
setUpClasss

zPasteTest.setUpClasscCs2|`|`|`|j��|j��|j��|`dS)N)r	r
rrr
Zupdate_idletasksZdestroy)rrrr�
tearDownClasss



zPasteTest.tearDownClassc	Cs~|j}dD]7\}}|j||d��$|�dd�|�dd|�|�d�|�|�dd�|�Wd�n1s7wYqdS)z4Test pasting into text with and without a selection.))�zonetwo
)Zselztwo
)�tag�ansz1.0�end�one�	<<Paste>>N)r	�subTest�delete�insert�event_generate�assertEqual�get)�selfr	rrrrr�test_paste_text%s
���zPasteTest.test_paste_textc
Cs�|j|jfD]@}dD];\}}|j|||d��'|�dd�|�dd�|�d|�|�d�|�|��|�Wd�n1s@wYq
qdS)z8Test pasting into an entry with and without a selection.�)rZonetwo)rr)r
rrrrrrN)	r
rrrrZselect_rangerrr)rr
rrrrr�test_paste_entry/s
����zPasteTest.test_paste_entryc	Cs�|j}dD];\}}|j||d��(|�dd�|�dd�|�dd|�|�d�|�|��|�Wd�n1s;wYqdS)	z9Test pasting into a spinbox with and without a selection.r!)rrrrr�rangerN)rrrrZ	selectionrrr)rrrrrrr�test_paste_spin<s
���zPasteTest.test_paste_spinN)
�__name__�
__module__�__qualname__�__doc__�classmethodrrr r"r$rrrrrs



r�__main__�)�	verbosity)
r(Ztest.supportr�tkinterrrZunittestZidlelibrZTestCaserr%�mainrrrr�<module>s=�