3
8Ad]ˆ  ã               @   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	   )ÚassertRaisesÚ	TypeErrorr   ÚassertEqual)ÚselfZsource_codeÚ	docstringÚsourceÚexpected© r   úv/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/traitsui-6.1.2-py3.6.egg/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   Ú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)Úunittestr   Ztraitsui.extras.demor   r   r   r   r   r   r   Ú<module>   s   