a
    ¦ˆcÆ  ã                   @   s:   d Z ddlZddlmZ ddlmZ G dd„ dejƒZdS )ú Test the Adapter class. é    N)Úon_trait_change)ÚAdapterc                   @   s   e Zd ZdZdd„ ZdS )ÚTestAdapterr   c                 C   s:   G dd„ dt ƒ}|dd�}|  |jd¡ |  |jd¡ d S )Nc                   @   s8   e Zd ZdZdZeddd�dd„ ƒZedƒdd„ ƒZd	S )
z9TestAdapter.test_initializing_adaptee.<locals>.FooAdapterFÚadapteeT)Z	post_initc                 S   s
   d| _ d S ©NT)Úpost_init_notifier_called©Úself© r   úg/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/traits/adaptation/tests/test_adapter.pyÚ(check_that_adaptee_start_can_be_accessed%   s    zbTestAdapter.test_initializing_adaptee.<locals>.FooAdapter.check_that_adaptee_start_can_be_accessedc                 S   s
   d| _ d S r   )Úadaptee_notifier_calledr	   r   r   r   Ú%check_that_adaptee_change_is_notified)   s    z_TestAdapter.test_initializing_adaptee.<locals>.FooAdapter.check_that_adaptee_change_is_notifiedN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r   r   r   Ú
FooAdapter   s   

r   Z1234)r   TF)r   ÚassertEqualr   r   )r
   r   Zfoo_adapterr   r   r   Útest_initializing_adaptee   s    
z%TestAdapter.test_initializing_adapteeN)r   r   r   Ú__doc__r   r   r   r   r   r      s   r   )r   ZunittestZ
traits.apir   Ztraits.adaptation.apir   ZTestCaser   r   r   r   r   Ú<module>   s   