관리-도구
편집 파일: test_editor.cpython-37.pyc
B � fc � @ s� d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ddl mZ ejZ G dd � d ej�ZG d d� dej�Zdd � ZG dd� dej�ZG dd� dej�Zedkr�ejdd� dS )zTest editor, coverage 35%.� )�editorN)� namedtuple)�requires)�Tk)�Funcc @ s, e Zd Zedd� �Zedd� �Zdd� ZdS )�EditorWindowTestc C s t d� t� | _| j�� d S )N�gui)r r �root�withdraw)�cls� r �B/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_editor.py� setUpClass s zEditorWindowTest.setUpClassc C sB | j �� x$| j j�dd�D ]}| j �|� qW | j �� | ` d S )N�after�info)r �update_idletasks�tk�call�after_cancel�destroy)r �idr r r � tearDownClass s zEditorWindowTest.tearDownClassc C s( t | jd�}| �|j| j� |�� d S )N)r )�Editorr �assertEqual�_close)�self�er r r � test_init s zEditorWindowTest.test_initN)�__name__� __module__�__qualname__�classmethodr r r r r r r r s r c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�TestGetLineIndentc C sP xJdD ]B}x<dD ]4}| j ||d�� | �tj||d�d� W d Q R X qW qW d S )N)� � � � � )� � )�line�tabwidth)r+ )r r )�subTestr r �get_line_indent)r r+ r* r r r �test_empty_lines$ s z"TestGetLineIndent.test_empty_linesc C sH d}x>|D ]6\}}| j |d�� | �tj|dd�|� W d Q R X q W d S )N))z no spaces)r r )z space test)r% r% )z tab test)r# r% )z double tabs test)r$ r'