3
8Ad]1  ã               @   sz   d Z ddlmZ ddlZddlmZmZmZmZm	Z	 ddl
mZmZ G dd„ deƒZG dd	„ d	eƒZG d
d„ dejƒZdS )z2 General regression tests for various fixed bugs.
é    )Úabsolute_importN)ÚDelegatesToÚEventÚ	HasTraitsÚInstanceÚ	Undefined)ÚEditorÚ
TextEditorc               @   s   e Zd Zeƒ ZdS )ÚParentN)Ú__name__Ú
__module__Ú__qualname__r   Úbutton© r   r   úz/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/traitsui-6.1.2-py3.6.egg/traitsui/tests/test_regression.pyr
      s   r
   c               @   s   e Zd ZeeƒZedƒZdS )ÚChildÚparentN)r   r   r   r   r
   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd Zdd„ Zdd„ ZdS )ÚTestRegressionc             C   s0   t tƒ d�}tdtƒ |dd�}| j|jtƒ dS )zF Make sure that DelegatesTo on Events passes Editor creation.
        )r   Nr   )ÚfactoryÚobjectÚname)r   r
   r   r	   ÚassertIsÚ	old_valuer   )ÚselfÚchildZeditorr   r   r   Ú!test_editor_on_delegates_to_event!   s    z0TestRegression.test_editor_on_delegates_to_eventc             C   s   | j ttdtƒ tƒ dd� dS )zE Make sure genuine AttributeErrors raise on Editor creation.
        NZnot_a_trait)r   r   r   )ÚassertRaisesÚAttributeErrorr   r	   r
   )r   r   r   r   Útest_attribute_error,   s    
z#TestRegression.test_attribute_errorN)r   r   r   r   r   r   r   r   r   r      s   r   )Ú__doc__Ú
__future__r   ÚunittestZ
traits.apir   r   r   r   r   Ztraitsui.apir   r	   r
   r   ÚTestCaser   r   r   r   r   Ú<module>   s   