File: D:/Python311/Lib/idlelib/idle_test/__pycache__/test_editor.cpython-311.pyc
�
��Vc � � � d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ej
Z G d� dej � � Z
G d � d
ej � � Zd� Z G d� d
ej � � Z G d� dej � � Zedk r ej d�� � dS dS )zTest editor, coverage 35%.� )�editorN)�
namedtuple)�requires)�Tkc �@ � e Zd Zed� � � Zed� � � Zd� ZdS )�EditorWindowTestc �| � t d� � t � � | _ | j � � � d S )N�gui)r r �root�withdraw��clss �1D:\Python311\Lib\idlelib\idle_test\test_editor.py�
setUpClasszEditorWindowTest.setUpClass s2 � �������4�4������������ c �� � | j � � � | j j � dd� � D ]}| j � |� � �| j � � � | ` d S �N�after�info)r �update_idletasks�tk�call�after_cancel�destroy�r �ids r �
tearDownClasszEditorWindowTest.tearDownClass so � ���!�!�#�#�#��(�+�"�"�7�F�3�3� &� &�B��H�!�!�"�%�%�%�%���������H�H�Hr c � � t | j �� � }| � |j | j � � |� � � d S )N�r )�Editorr �assertEqual�_close)�self�es r � test_initzEditorWindowTest.test_init s? � ��� �"�"�"���������+�+�+� ���
�
�
�
�
r N)�__name__�
__module__�__qualname__�classmethodr r r% � r r r r sW � � � � � ��� � �[��
�� � �[��� � � � r r c � � e Zd Zd� Zd� Zd� ZdS )�TestGetLineIndentc �� � dD ]`}dD ][}| � ||�� � 5 | � t j ||�� � d� � d d d � � n# 1 swxY w Y �\�ad S )N)� � � � � )� �
)�line�tabwidth�r6 �r r ��subTestr! r �get_line_indent)r# r6 r5 s r �test_empty_linesz"TestGetLineIndent.test_empty_lines# s� � �'� � �H�"�
�
���\�\�t�h�\�?�?� � ��$�$��.�t�h�G�G�G��� � �� � � � � � � � � � ���� � � � ��
� � s �+A�A�Ac �� � d}|D ]]\ }}| � |�� � 5 | � t j |d�� � |� � d d d � � n# 1 swxY w Y �^d S )N)�z no spacesr8 )z space test)r0 r0 )� tab test)r. r0 )� double tabs test)r/ r2 )z mixed test�� r2 )z mixed test)rB r1 )z mixed testrA )�
mixed test)� r0 )�
mixed test)rD rB )�
mixed test)rD r1 �z
newline testr8 �r5 r0 r7 r9 �r# �testsr5 �expecteds r �test_tabwidth_4z!TestGetLineIndent.test_tabwidth_4, � � �-�� $� � �N�D�(����4��(�(�
�
�� � ��*�4�!�<�<�<��� � �
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�� � � �+A�A �A c �� � d}|D ]]\ }}| � |�� � 5 | � t j |d�� � |� � d d d � � n# 1 swxY w Y �^d S )N)r>