3
8ßL]ˆ  ã               @   s0   d dl mZ d dlmZmZ G dd„ deƒZdS )é    )ÚTestCase)Úextract_docstring_from_sourceÚparse_sourcec               @   s   e Zd Zdd„ Zdd„ ZdS )ÚTestDemoc             C   sn   d}| j tƒ� t|ƒ\}}W d Q R X d}t|ƒ\}}| jd||fƒ d}t|ƒ\}}d}| j|||fƒ d S )Nó    Ú z"""" Module description """
x=1
y=2ú Module description úx=1
y=2)r   r   )r   r	   )ZassertRaisesÚ	TypeErrorr   ZassertEqual)ÚselfZsource_codeÚ	docstringÚsourceÚexpected© r   ú@/tmp/pip-install-5sebvq2j/traitsui/traitsui/tests/test_extras.pyÚ"test_extract_docstring_from_source   s    z+TestDemo.test_extract_docstring_from_sourcec             C   s   t dƒ\}}| jd|ƒ d S )Nznon-existent-file.<>|:zSorry, something went wrong.)r   ZassertIn)r   r   r   r   r   r   Útest_parse_source   s    zTestDemo.test_parse_sourceN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s   r   N)Zunittestr   Ztraitsui.extras.demor   r   r   r   r   r   r   Ú<module>   s   