3
7ßL]  ã               @   sB   d dl mZ d dlZddlmZ ddlmZ G dd„ dejƒZdS )é    )Úabsolute_importNé   )ÚAction)ÚActionEventc               @   s<   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ ZdS )Ú
TestActionc             C   s   t dd�}| j|jdƒ d S )NÚTest)Úname)r   ÚassertEqualÚid)ÚselfÚaction© r   úC/tmp/pip-install-5sebvq2j/pyface/pyface/action/tests/test_action.pyÚtest_default_id   s    
zTestAction.test_default_idc             C   s   t ddd�}| j|jdƒ d S )Nr   Útest)r   r
   )r   r	   r
   )r   r   r   r   r   Útest_id   s    zTestAction.test_idc                s>   g ‰ ‡ fdd„}t d|d�}tƒ }|j|ƒ | jˆ dgƒ d S )Nc                  s   ˆ j dƒ d S )NÚcalled)Úappendr   )Úmemor   r   Úperform   s    z(TestAction.test_perform.<locals>.performr   )r   Z
on_performr   )r   r   r   r	   )r   r   r   Úeventr   )r   r   Útest_perform   s    
zTestAction.test_performc             C   s   t dd�}tƒ }|j|ƒ d S )Nr   )r   )r   r   r   )r   r   r   r   r   r   Útest_perform_none    s    
zTestAction.test_perform_nonec             C   s   t dd�}|jƒ  d S )Nr   )r   )r   Údestroy)r   r   r   r   r   Útest_destroy&   s    
zTestAction.test_destroyc                sB   g ‰ ‡ fdd„}t dd|d�}d }|j|ƒ | jˆ ||fgƒ d S )Nc                s   ˆ j | |fƒ d S )N)r   )Úparentr   )r   r   r   Úcontrol_factory0   s    z6TestAction.test_widget_action.<locals>.control_factoryZDummyZwidget)r   Ústyler   )r   Zcreate_controlr	   )r   r   r   r   r   )r   r   Útest_widget_action+   s    
zTestAction.test_widget_actionN)	Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r   r   r   	   s   r   )	Ú
__future__r   Zunittestr   r   Zaction_eventr   ZTestCaser   r   r   r   r   Ú<module>   s   