관리-도구
편집 파일: test_config_key.cpython-37.pyc
B � f�% � @ s� d Z ddlmZ ddlmZ ddlZddlmZ ddlmZm Z ddl mZ ddlm Z ejZG d d � d ej�ZG dd� dej�ZG d d� dej�ZG dd� dej�ZG dd� dej�Zedkr�ejdd� dS )z�Test config_key, coverage 98%. Coverage is effectively 100%. Tkinter dialog is mocked, Mac-only line may be skipped, and dummy function in bind test should not be called. Not tested: exit with 'self.advanced or self.keys_ok(keys)) ...' False. � )� config_key)�requiresN)�mock)�Tk�TclError)�Func)� Mbox_funcc @ s� e Zd ZdZG dd� de�Zedd� �Zedd� �Zdd � Z d d� Z dd � Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� ZdS )�ValidationTestz.Test validation methods: ok, keys_ok, bind_ok.c @ s e Zd Zdd� Ze� Ze� ZdS )zValidationTest.Validatorc O s, t jj| f|�|� G dd� d�}|| _d S )Nc @ s e Zd Ze� ZdS )z:ValidationTest.Validator.__init__.<locals>.list_keys_finalN)�__name__� __module__�__qualname__r �get� r r �F/opt/alt/python37/lib64/python3.7/idlelib/idle_test/test_config_key.py�list_keys_final s r )r � GetKeysDialog�__init__r )�self�args�kwargsr r r r r s z!ValidationTest.Validator.__init__N)r r r r r � get_modifiersr � showerrorr r r r � Validator s r c C sD t d� t� | _| j�� dgddgg}| j| jdd|dd�| _d S ) N�guiz <Key-F12>z<Control-Key-x>z<Control-Key-X>�Titlez<<Test>>T)�_utest)r r �root�withdrawr �dialog)�clsZkeylistr r r � setUpClass s zValidationTest.setUpClassc C s* | j �� | j�� | j�� | ` | `d S )N)r �cancelr �update_idletasks�destroy)r r r r � tearDownClass( s zValidationTest.tearDownClassc C s d| j j_d S )N� )r r �message)r r r r �setUp/ s zValidationTest.setUpc C s>