HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/__pycache__/test_eof.cpython-310.opt-1.pyc
o

�i�@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�*/usr/local/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�