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_autoexpand.cpython-311.opt-2.pyc
�

��Vc����	ddlmZddlZddlmZddlmZmZGd�d��ZGd�dej	��Z
ed	krejd
���dSdS)�)�
AutoExpandN)�requires)�Text�Tkc��eZdZd�ZdS)�DummyEditwinc��||_dS�N)�text)�selfrs  �5D:\Python311\Lib\idlelib\idle_test\test_autoexpand.py�__init__zDummyEditwin.__init__s
����	�	�	�N)�__name__�
__module__�__qualname__r�rr
rr	s#����������rrc�^�eZdZed���Zed���Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	S)
�AutoExpandTestc���td��t��|_t|j��|_tt
|j����|_d�|j_dS)N�guic��dSr
rrrr
�<lambda>z+AutoExpandTest.setUpClass.<locals>.<lambda>s��t�r)	rr�tkrrrr�auto_expand�bell��clss r
�
setUpClasszAutoExpandTest.setUpClasssR���������������<�<���$�\�#�(�%;�%;�<�<���+�|�����rc�h�|`|`t|d��r|j���|`dSdS)Nr)rr�hasattrr�destroyrs r
�
tearDownClasszAutoExpandTest.tearDownClass'sB���H�c�o��3����	��F�N�N��������	�	rc�<�|j�dd��dS)N�1.0�end)r�delete)rs r
�tearDownzAutoExpandTest.tearDown.s ���	�����&�&�&�&�&rc��|j}|jj}|j}||��d��|�dd��||��d��|�dd��||��d��|�dd��||��d��|�dd��||��d��|�dd��||��d	��|�d
d��||��d��|�dd��||��d��dS)
N��insert�t�his�this� �isz
sample
string�stringz3.0r%r&)rr�getprevword�assertEqualr+r')rr�previous�equals    r
�test_get_prevwordz AutoExpandTest.test_get_prevword1so���y���#�/��� ��
��h�h�j�j�"�������H�c�"�"�"�
��h�h�j�j�#�������H�e�$�$�$�
��h�h�j�j�&�!�!�!����H�c�"�"�"�
��h�h�j�j�"�������H�d�#�#�#�
��h�h�j�j�$�������H�0�1�1�1�
��h�h�j�j�(�#�#�#����E�8�$�$�$�
��h�h�j�j�"�������E�5�!�!�!�
��h�h�j�j�"�����rc��|jj}|jj}|j}|j�dd��||j���gd���|d��||��d��|d��||��d��|d��||��d��|d��||��d��dS)	Nr+zab ac bx ad ab a)�ab�ad�ac�a�eventr8r9r:r;)rr2�expand_word_eventr3rr+�getwords)rr4�expandr5s    r
�test_before_onlyzAutoExpandTest.test_before_onlyMs����#�/���!�3��� ���	����#5�6�6�6�
��d��'�'�)�)�+B�+B�+B�C�C�C���w����
��h�h�j�j�$������w����
��h�h�j�j�$������w����
��h�h�j�j�$������w����
��h�h�j�j�#�����rc���|j}|jj}|jj}|j}|�dd��|�dd��||j���gd���|d��||��d��|d��||��d��|d��||��d��|d��||��d	��dS)
Nr+z a, [ab] ac: () bx"" cd ac= ad yaz1.1)r8r:r9r;r<r8r:r9r;�rrr2r=r3r+�mark_setr>�rrr4r?r5s     r
�test_after_onlyzAutoExpandTest.test_after_only]s���y���#�/���!�3��� �����H�@�A�A�A��
�
�h��&�&�&�
��d��'�'�)�)�+B�+B�+B�C�C�C���w����
��h�h�j�j�$������w����
��h�h�j�j�$������w����
��h�h�j�j�$������w����
��h�h�j�j�#�����rc���|j}|jj}|jj}|j}|�dd��|�dd��|�dd��||j���gd���|d��||��d��|d��||��d��|d��||��d	��dS)
Nr+z	ab xy yz
z
a ac by acz2.1)r8r:r;r<r8r:r;rBrDs     r
�test_both_before_afterz%AutoExpandTest.test_both_before_afterps���y���#�/���!�3��� �����H�l�+�+�+����H�l�+�+�+��
�
�h��&�&�&�
��d��'�'�)�)�+<�+<�+<�=�=�=���w����
��h�h�j�j�$������w����
��h�h�j�j�$������w����
��h�h�j�j�#�����rc�(�|j}|jj}|j}||j���g��||d��d��|�dd��||j���g��|�dd��|�dd��|d��|jj}|�dd��|d��|jj}|�||��dS)Nr<�breakr+z
bx cy dz azac xy a ac ad az1.7z1.end)	rrr=r3r>r+rC�state�assertNotEqual)rrr?r5�
initial_state�	new_states      r
�test_other_expand_casesz&AutoExpandTest.test_other_expand_cases�s���y���!�3��� ��	��d��'�'�)�)�2�.�.�.�
��f�f�W�o�o�w�'�'�'����H�l�+�+�+�
��d��'�'�)�)�2�.�.�.�	
���H�/�0�0�0��
�
�h��&�&�&���w�����(�.�
��
�
�h��(�(�(���w�����$�*�	����M�9�5�5�5�5�5rN)rrr�classmethodrr#r(r6r@rErGrNrrr
rrs��������,�,��[�,�,����[��'�'�'����8��� ���&���$6�6�6�6�6rr�__main__�)�	verbosity)
�idlelib.autoexpandr�unittest�test.supportr�tkinterrrr�TestCaserr�mainrrr
�<module>rYs���!�)�)�)�)�)�)�����!�!�!�!�!�!�����������������
I6�I6�I6�I6�I6�X�&�I6�I6�I6�X�z����H�M�A��������r