관리-도구
편집 파일: test_editmenu.cpython-37.opt-1.pyc
B � 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�� t�|� t �|�| _t �|�| _ t �|�| _t �|�| _ |�� |�d� d S )N�two)�tkZTk�rootZwithdrawr Z fix_x11_pasteZText�textZEntry�entryr �tentryZSpinbox�spin�clipboard_clearZclipboard_append)�clsr � r �D/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_editmenu.py� setUpClass s zPasteTest.setUpClassc C s2 | ` | `| `| j�� | j�� | j�� | `d S )N)r r r r r Zupdate_idletasksZdestroy)r r r r � tearDownClass s zPasteTest.tearDownClassc C sn | j }xbdD ]Z\}}| j||d��> |�dd� |�dd|� |�d� | �|�dd�|� W dQ R X qW dS )z4Test pasting into text with and without a selection.))� zonetwo )Zselztwo )�tag�ansz1.0�end�onez <<Paste>>N)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 |�dd� |�dd� |�d|� |�d� | �|�� |� W dQ R X qW qW dS )z8Test pasting into an entry with and without a selection.))r �onetwo)r r )r r r r r r z <<Paste>>N) r r r r r Zselect_ranger r r )r r r r r r r �test_paste_entry/ s zPasteTest.test_paste_entryc C sv | j }xjdD ]b\}}| j||d��F |�dd� |�dd� |�dd|� |�d� | �|�� |� W dQ R X qW dS ) z9Test pasting into a spinbox with and without a selection.))r r )r r )r r r r r �rangez <<Paste>>N)r r r r Z selectionr r r )r r r r r r r �test_paste_spin<