관리-도구
편집 파일: test_text.cpython-37.opt-1.pyc
B � fB � @ sv d Z ddlZddlmZ ddlmZ G dd� de�ZG dd� deej�Z G d d � d eej�Z edkrrejdd d� dS )zi Test mock_tk.Text class against tkinter.Text class Run same tests with both by creating a mixin class. � N)�requires)�TclErrorc @ sl e Zd ZdZdZed Zdd� Zdd� Zdd � Zd d� Z dd � Z dd� Zdd� Zdd� Z dd� Zdd� ZdS )�TextTestz*Define items common to both sets of tests.zhello world� c C s, | � | j�d�d� | � | j�d�d� d S )Nz1.0r �end� )�assertEqual�text�get)�self� r �@/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_text.py� test_init s zTextTest.test_initc C sH | j j}xdD ]}| �||�d� qW xdD ]}| �||�d� q,W d S )N)g �g333333�?z1.-1z1.0z1.0 lineendz1.endz1.33�insertz1.0)r g @z2.1z33.44z2.0)r �indexr )r r �dexr r r �test_index_empty s zTextTest.test_index_emptyc C sv | j j}| j �d| j� xdD ]}| �||�d� qW xdD ]}| �||�d� q<W xdD ]}| �||�d� qZW d S )Nz1.0)g �g333333�?z1.-1z1.0)z1.0 lineendz1.endz1.33z1.5)r z33.44z3.0)r r r �hwr )r r r r r r �test_index_data s zTextTest.test_index_datac C s� | j j}| j}| j �d| j� ||d�d� ||dd�d� ||d�d� ||dd�d� ||dd�d� ||dd�d� ||dd �d � ||dd�d � ||d �d� ||dd �d� ||dd�| j� ||dd�| j� ||dd�| j� d S )Nz1.0r r �hz1.1z1.3ZhelZelz1.0 lineend�helloz1.10r z2.3zello worz2.5z0.0z5.0)r r r r r �hwn)r r �Equalr r r �test_get- s zTextTest.test_getc C s� | j j}| j j}| j}|d| j� ||dd�| j� |dd� ||dd�| j� |dd� ||dd�d� |dd� ||dd�d� |dd� ||dd�d � |dd � ||dd�d� |dd � ||dd�d� d S )Nz1.0r r �*z *hello world z1.0 lineendz*hello* world z2.3z*hello* wor*ld �xz*hello* wor*ldx z1.4zx z*helx lo* wor*ldx )r r r r r r )r r r r r r r �test_insert@ s"