3
8ßL]/  ã               @   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 )z Test the Adapter class. é    N)Úon_trait_change)ÚAdapterc               @   s   e Zd ZdZdd„ ZdS )ÚTestAdapterz Test the Adapter class. c             C   s:   G dd„ dt ƒ}|dd�}| j|jdƒ | j|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   úH/tmp/pip-install-5sebvq2j/traits/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 )NT)Úadaptee_notifier_called)r   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   Z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   