관리-도구
편집 파일: test_squeezer.cpython-37.opt-2.pyc
B YI~dxN � @ s� d dl mZ d dlmZmZ d dlZd dlmZmZm Z m Z mZ d dlm Z d dlmZ d dlmZmZmZ d dlmZ d d lmZ d d lmZ d dlmZ e jZdd � ZG dd� dej�ZG dd� dej�Z G dd� dej�Z!e"dkr�ej#dd� dS )� )�dedent)�Text�TkN)�Mock�NonCallableMagicMock�patch�sentinel�ANY)�requires)�idleConf)�count_lines_with_wrapping�ExpandingButton�Squeezer)�macosx)� view_text)�Hovertip)�PyShellc s0 t d� t� � � �� � fdd�}| �|� � S )NZguic s � � � � �� d S )N)Zupdate_idletasksZdestroy� )�rootr �D/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_squeezer.py�cleanup_root s z&get_test_tk_root.<locals>.cleanup_root)r r Zwithdraw� addCleanup)Z test_instancer r )r r �get_test_tk_root s r c @ sL e Zd Zdd� Zdd� Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dS )�CountLinesTestc C s | � |t||��S )N)�assertEqualr )�self�expected�text� linewidthr r r �check% s zCountLinesTest.checkc C s | � td�d� d S )N� r )r r )r r r r �test_count_empty+ s zCountLinesTest.test_count_emptyc C s | � td�d� d S )Nz text� )r r )r r r r �!test_count_begins_with_empty_line/ s z0CountLinesTest.test_count_begins_with_empty_linec C s | � td�d� d S )Nztext � )r r )r r r r �test_count_ends_with_empty_line3 s z.CountLinesTest.test_count_ends_with_empty_linec C s | � td�d� d S )Nz1 2 3 � )r r )r r r r �test_count_several_lines7 s z'CountLinesTest.test_count_several_linesc C s4 | j dddd� | j dddd� | j dddd� d S ) Nr$ � �P )r r r r"