관리-도구
편집 파일: test_editmenu.cpython-36.opt-1.pyc
3 � f � @ sj d Z ddlmZ ed� ddlZddlmZ ddlZddlmZ G dd� dej �Z ed krfejd d� dS )zNTest (selected) IDLE Edit menu items. Edit modules have their own test files � )�requiresZguiN)�ttk)�pyshellc @ s@ e Zd ZdZedd� �Zedd� �Zdd� Zdd � Zd d� Z dS ) � PasteTestzeTest pasting into widgets that allow pasting. On X11, replacing selections requires tk fix. c C sh t j� | _}| jj� tj|� t j|�| _t j|�| _ t j|�| _t j|�| _ |j� |jd� d S )N�two)�tkZTk�rootZwithdrawr Z fix_x11_pasteZText�textZEntry�entryr �tentryZSpinbox�spin�clipboard_clearZclipboard_append)�clsr � r �D/opt/alt/python36/lib64/python3.6/idlelib/idle_test/test_editmenu.py� setUpClass s zPasteTest.setUpClassc C s2 | ` | `| `| jj� | jj� | jj� | `d S )N)r r r r r Zupdate_idletasksZdestroy)r r r r � tearDownClass s zPasteTest.tearDownClassc C sn | j }xbd D ]Z\}}| j||d��> |jdd� |jdd|� |jd � | j|jdd�|� W d Q R X qW d S )z4Test pasting into text with and without a selection.� �onetwo �sel�two )�tag�ansz1.0�end�onez <<Paste>>N�r r �r r )r r )r �subTest�delete�insert�event_generate�assertEqual�get)�selfr r r r r r �test_paste_text% s zPasteTest.test_paste_textc C s� x�| j | jfD ]p}xjdD ]b\}}| j|||d��D |jdd� |jdd� |jd|� |jd� | j|j� |� W dQ R X qW qW dS )z8Test pasting into an entry with and without a selection.r �onetwor r )r r r r z <<Paste>>N�r r% �r r )r&