Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_eof.cpython-39.opt-1.pyc

a

��g�	�@sRdZddlZddlmZddlmZddlZGdd�dej�Ze	dkrNe�
�dS)z/test script for a few new invalid token catches�N)�support)�
script_helperc@sDeZdZdd�Zdd�Zdd�Zdd�Ze�e	j
d	�d
d��ZdS)
�EOFTestCasec
CsPd}ztd�Wn4tyD}z|�t|�|�WYd}~nd}~00tj�dS)Nz4EOL while scanning string literal (<string>, line 1)z'this is a test            ��eval�SyntaxError�assertEqual�strr�
TestFailed��self�expect�msg�r�)/usr/local/lib/python3.9/test/test_eof.py�	test_EOFC	s&zEOFTestCase.test_EOFCc
CsPd}ztd�Wn4tyD}z|�t|�|�WYd}~nd}~00tj�dS)NzBEOF while scanning triple-quoted string literal (<string>, line 1)z'''this is a testrrrrr�	test_EOFSs&zEOFTestCase.test_EOFSc
CsXd}ztddddd�Wn4tyL}z|�t|�|�WYd}~nd}~00tj�dS)N�/unexpected EOF while parsing (<string>, line 1)z"\xhh" \z<string>�execT)�dont_inherit)�compilerrr	rr
rrrr�test_eof_with_line_continuations&z+EOFTestCase.test_eof_with_line_continuationcCs�d}|�t��}td�Wd�n1s,0Y|�t|j�|�|�t��}td�Wd�n1sp0Y|�t|j�|�dS)z=A continuation at the end of input must be an error; bpo2180.rzx = 5\N�\)ZassertRaisesrrrr	�	exception)rr
�excinforrr�test_line_continuation_EOF&s&&z&EOFTestCase.test_line_continuation_EOFzsys.executable requiredcCs�t����}t�|dd�}t�|�\}}}|�d|�|�d|�|�d|�t�|dd�}t�|�\}}}|�d|�|�d|�|�d|�Wd�n1s�0YdS)	z9Ensure tok_nextc() does not add too many ending newlines.Zfoorsunexpected EOF while parsingsline 2�\zy = 6\sy = 6\N)r�temp_dirrZmake_scriptZassert_python_failureZassertIn)rr�	file_name�rc�out�errrrr�,test_line_continuation_EOF_from_file_bpo21800s
z8EOFTestCase.test_line_continuation_EOF_from_file_bpo2180N)�__name__�
__module__�__qualname__rrrr�unittestZskipIf�sys�
executabler"rrrrrs

	
r�__main__)�__doc__r'�testrZtest.supportrr&ZTestCaserr#�mainrrrr�<module>s8

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists