HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/idlelib/idle_test/__pycache__/test_editmenu.cpython-311.pyc
�

��VcN
���dZddlmZed��ddlZddlmZddlZddlmZGd�dej	��Z
ed	krejd
���dSdS)zNTest (selected) IDLE Edit menu items.

Edit modules have their own test files
�)�requires�guiN)�ttk)�pyshellc�P�eZdZdZed���Zed���Zd�Zd�Zd�Z	dS)�	PasteTestzeTest pasting into widgets that allow pasting.

    On X11, replacing selections requires tk fix.
    c��tj��x|_}|j���t	j|��tj|��|_tj|��|_	tj|��|_tj|��|_
|���|�d��dS)N�two)�tk�Tk�root�withdrawr�
fix_x11_paste�Text�text�Entry�entryr�tentry�Spinbox�spin�clipboard_clear�clipboard_append)�clsr
s  �3D:\Python311\Lib\idlelib\idle_test\test_editmenu.py�
setUpClasszPasteTest.setUpClasss����%�'�'�!���4����������d�#�#�#��7�4�=�=����H�T�N�N��	��Y�t�_�_��
��:�d�#�#������������e�$�$�$�$�$�c��|`|`|`|j���|j���|j���|`dS)N)rrrr
r�update_idletasks�destroy)rs r�
tearDownClasszPasteTest.tearDownClasssT���H�c�i����� � �"�"�"���!�!�#�#�#���������H�H�Hrc�Z�|j}dD]�\}}|�||���5|�dd��|�dd|��|�d��|�|�dd��|��ddd��n#1swxYwY��dS)z4Test pasting into text with and without a selection.))�zonetwo
)�selztwo
)�tag�ansz1.0�end�one�	<<Paste>>N)r�subTest�delete�insert�event_generate�assertEqual�get)�selfrr$r%s    r�test_paste_textzPasteTest.test_paste_text%s����y��:�	>�	>�H�C�����#�3��/�/�
>�
>����E�5�)�)�)����E�5�#�.�.�.��#�#�K�0�0�0�� � ����%��!7�!7��=�=�=�	
>�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>����
>�
>�
>�
>��	>�	>s�A-B�B#	�&B#	c��|j|jfD]�}dD]�\}}|�|||���5|�dd��|�dd��|�d|��|�d��|�|���|��ddd��n#1swxYwY����dS)z8Test pasting into an entry with and without a selection.�)r�onetwo)r&r
)rr&r%rr&r'r(N)	rrr)r*r+�select_ranger,r-r.)r/rr&r%s    r�test_paste_entryzPasteTest.test_paste_entry/s���Z���,�	7�	7�E�9�
7�
7���S��\�\��3�C�\�@�@�7�7��L�L��E�*�*�*��L�L��E�*�*�*��&�&�q�#�.�.�.��(�(��5�5�5��$�$�U�Y�Y�[�[�#�6�6�6�7�7�7�7�7�7�7�7�7�7�7����7�7�7�7��
7�	7�	7s�BB<�<C�Cc��|j}dD]�\}}|�||���5|�dd��|�dd��|�dd|��|�d��|�|���|��ddd��n#1swxYwY��dS)	z9Test pasting into a spinbox with and without a selection.r2)r&r%rr&r'�ranger(N)rr)r*r+�	selectionr,r-r.)r/rr&r%s    r�test_paste_spinzPasteTest.test_paste_spin<s���y��5�	2�	2�H�C�����#�3��/�/�
2�
2����A�u�%�%�%����A�u�%�%�%����w��3�/�/�/��#�#�K�0�0�0�� � ������S�1�1�1�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2����
2�
2�
2�
2��	2�	2s�BB3�3B7	�:B7	N)
�__name__�
__module__�__qualname__�__doc__�classmethodrr r0r5r9�rrrrs����������	%�	%��[�	%�����[��>�>�>�7�7�7�
2�
2�
2�
2�
2rr�__main__�)�	verbosity)
r=�test.supportr�tkinterrr�unittest�idlelibr�TestCaserr:�mainr?rr�<module>rIs�����"�!�!�!�!�!���������������������������:2�:2�:2�:2�:2��!�:2�:2�:2�z�z����H�M�A��������r