Your IP : 216.73.216.213


Current Path : /opt/alt/python39/lib64/python3.9/idlelib/idle_test/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/idlelib/idle_test/__pycache__/test_editmenu.cpython-39.opt-1.pyc

a

XC?h
�@sjdZddlmZed�ddlZddlmZddlZddlmZGdd�dej	�Z
ed	krfejd
d�dS)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_paste�Text�textZEntry�entryr�tentryZSpinbox�spin�clipboard_clearZclipboard_append)�clsr�r�D/opt/alt/python39/lib64/python3.9/idlelib/idle_test/test_editmenu.py�
setUpClasss

zPasteTest.setUpClasscCs2|`|`|`|j��|j��|j��|`dS)N)r
rrrrZupdate_idletasksZdestroy)rrrr�
tearDownClasss



zPasteTest.tearDownClassc	Cs~|j}dD]n\}}|j||d��H|�dd�|�dd|�|�d�|�|�dd�|�Wd�q
1sn0Yq
dS)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]v\}}|j|||d��N|�dd�|�dd�|�d|�|�d�|�|��|�Wd�q1s�0YqqdS)z8Test pasting into an entry with and without a selection.�)rZonetwo)rr)rrrrrrrN)	rrrrrZselect_rangerrr)r rrrrrr�test_paste_entry/s
zPasteTest.test_paste_entryc	Cs�|j}dD]v\}}|j||d��P|�dd�|�dd�|�dd|�|�d�|�|��|�Wd�q
1sv0Yq
dS)	z9Test pasting into a spinbox with and without a selection.r")rrrrr�rangerN)r
rrrZ	selectionrrr)r r
rrrrr�test_paste_spin<s
zPasteTest.test_paste_spinN)
�__name__�
__module__�__qualname__�__doc__�classmethodrrr!r#r%rrrrrs



r�__main__�)�	verbosity)
r)Ztest.supportrZtkinterrrZunittestZidlelibrZTestCaserr&�mainrrrr�<module>s=