B
    u9a—  ã               @   s@   d dl Z G dd„ de jƒZG dd„ de jƒZedkr<e  ¡  dS )é    Nc               @   s   e Zd Zdd„ Zdd„ ZdS )ÚPEP3120Testc             C   s(   |   d d¡d¡ |   d d¡d¡ d S )Nu
   ÐŸÐ¸Ñ‚Ð¾Ð½zutf-8s
   ÐŸÐ¸Ñ‚Ð¾Ð½u   \ÐŸs   \ÐŸ)ÚassertEqualÚencode)Úself© r   ú%/usr/lib/python3.7/test_utf8source.pyÚtest_pep3120   s    zPEP3120Test.test_pep3120c          
   C   sX   ydd l }W n< tk
rH } zt|ƒ ¡ }|  d|k¡ W d d }~X Y nX |  d¡ d S )Nr   zutf-8zexpected exception didn't occur)Ztest.badsyntax_pep3120ÚSyntaxErrorÚstrÚlowerZ
assertTrueÚfail)r   ZtestÚmsgr   r   r   Útest_badsyntax   s     zPEP3120Test.test_badsyntaxN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r      s   
r   c               @   s   e Zd Zdd„ ZdS )ÚBuiltinCompileTestsc             C   s\   d  d¡}yt|ddƒ}W n tk
r8   |  d¡ Y nX i }t||ƒ |  d|d ¡ d S )Nu   # coding: Latin-1
u = "Ã‡"
zLatin-1z<dummy>Úexecz&compile() cannot handle Latin-1 sourceõ   Ã‡Úu)r   Úcompiler	   r   r   r   )r   Zsource_codeÚcodeÚnsr   r   r   Útest_latin1   s    

zBuiltinCompileTests.test_latin1N)r   r   r   r   r   r   r   r   r      s   r   Ú__main__)ZunittestZTestCaser   r   r   Úmainr   r   r   r   Ú<module>   s   