Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.146.221.131
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_eof.cpython-310.pyc
o

`b�@sbdZddlZddlmZddlmZddlmZddlZGdd�dej�Z	e
dkr/e��dSdS)	z/test script for a few new invalid token catches�N)�support)�	os_helper)�
script_helperc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Ze�	e
jd�dd
��ZdS)�EOFTestCasecCsjd}dD].}zt|�d��Wtj�ty2}z|�t|�|�|�|jd�WYd}~qd}~wwdS)NzCunterminated string literal (detected at line 1) (<string>, line 1))�'�"zthis is a test                ���eval�SyntaxError�assertEqual�str�offsetr�
TestFailed)�self�expect�quote�msg�r�6/usr/local/python-3.10/lib/python3.10/test/test_eof.py�test_EOF_single_quote
s����z!EOFTestCase.test_EOF_single_quotec
CsZd}ztd�Wtj�ty,}z|�t|�|�|�|jd�WYd}~dSd}~ww)NzQunterminated triple-quoted string literal (detected at line 1) (<string>, line 1)z'''this is a testrr	�rrrrrr�	test_EOFSs
���zEOFTestCase.test_EOFScCsZd}t���}t�|dd�}t�|�\}}}Wd�n1s wY|�d|�dS)Nz(<string>, line 1)�fooz'''this is 
a 
tests>unterminated triple-quoted string literal (detected at line 3)�r�temp_dirrZmake_scriptZassert_python_failureZassertIn)rrr�	file_name�rc�out�errrrr�test_EOFS_with_file s
�zEOFTestCase.test_EOFS_with_filec
CsTd}ztddddd�Wtj�ty)}z|�t|�|�WYd}~dSd}~ww)N�/unexpected EOF while parsing (<string>, line 1)z"\xhh" \z<string>�execT)�dont_inherit)�compilerrr
rrrrrr�test_eof_with_line_continuation's���z+EOFTestCase.test_eof_with_line_continuationcCs�d}|�t��}td�Wd�n1swY|�t|j�|�|�t��}td�Wd�n1s8wY|�t|j�|�dS)z=A continuation at the end of input must be an error; bpo2180.r!zx = 5\N�\)ZassertRaisesrr"rr
�	exception)rr�excinforrr�test_line_continuation_EOF0s
�
�z&EOFTestCase.test_line_continuation_EOFzsys.executable requiredcCs�t���K}t�|dd�}t�|�\}}}|�d|�|�d|�|�d|�t�|dd�}t�|�\}}}|�d|�|�d|�|�d|�Wd�dS1sRwYdS)	z9Ensure tok_nextc() does not add too many ending newlines.rr&sunexpected EOF while parsingsline 1�\zy = 6\sy = 6\Nr)rrrrrrrrr�,test_line_continuation_EOF_from_file_bpo2180:s
"�z8EOFTestCase.test_line_continuation_EOF_from_file_bpo2180N)
�__name__�
__module__�__qualname__rrr r%r)�unittestZskipIf�sys�
executabler+rrrrr	s
	
r�__main__)�__doc__r0�testrZtest.supportrrr/ZTestCaserr,�mainrrrr�<module>sA�
© 2025 GrazzMean