HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/__pycache__/test_eof.cpython-312.opt-2.pyc
�

�h�ej���	ddlZddlmZddlmZddlmZddlmZddlZGd�dej�Z	e
dk(rej�yy)	�N)�support)�	os_helper)�
script_helper)�warnings_helperc��eZdZd�Zd�Zd�Zeje��d��Z	d�Z
eje
jd�d��Zy	)
�EOFTestCasec���d}dD] }	t|�d��tj�y#t$rA}|j	t|�|�|j	|jd�Yd}~�id}~wwxYw)NzCunterminated string literal (detected at line 1) (<string>, line 1))�'�"zthis is a test                ���evalr�
TestFailed�SyntaxError�assertEqual�str�offset)�self�expect�quote�msgs    �4/opt/alt/python312/lib64/python3.12/test/test_eof.py�test_EOF_single_quotez!EOFTestCase.test_EOF_single_quotes|��V�� �	)�E�
)��%��!����(�(�(�	)���
0�� � ��S��6�2�� � ����Q�/�/��
0�s�)�	A3�7A.�.A3c���d}	td�tj�#t$rA}|j	t|�|�|j	|jd�Yd}~yd}~wwxYw)NzQunterminated triple-quoted string literal (detected at line 1) (<string>, line 1)z'''this is a testrr
�rrrs   r�	test_EOFSzEOFTestCase.test_EOFSs`��e��	%��(�)�
�$�$�$��	�	,����S��X�v�.����S�Z�Z��+�+��	,�s��	A)�7A$�$A)c���d}tj�5}tj|dd�}tj|�\}}}ddd�|jd�y#1swY�xYw)Nz(<string>, line 1)�fooz'''this is 
a 
tests>unterminated triple-quoted string literal (detected at line 3)�r�temp_dirr�make_script�assert_python_failure�assertIn)rrr �	file_name�rc�out�errs       r�test_EOFS_with_filezEOFTestCase.test_EOFS_with_file!sk��&��
�
�
�
!�	J�X�%�1�1�(�E�C^�_�I�(�>�>�y�I�L�B��S�	J�	
�
�
�W�Y\�]�	J�	J�s�1A#�#A,)�categoryc��d}	tddd�tj�#t$r%}|j	t|�|�Yd}~yd}~wwxYw)N�/unexpected EOF while parsing (<string>, line 1)z"\Xhh" \z<string>�exec)�compilerrrrrrs   r�test_eof_with_line_continuationz+EOFTestCase.test_eof_with_line_continuation(sO��B��	%��L�*�f�5��$�$�$���	/����S��X�v�.�.��	/�s�
!�	A�A
�
Ac�r�	d}|jt�5}td�ddd�|jt	j
�|�|jt�5}td�ddd�|jt	|j
�|�y#1swY�}xYw#1swY�;xYw)Nr+zx = 5\�\)�assertRaisesrr,rr�	exception)rr�excinfos   r�test_line_continuation_EOFz&EOFTestCase.test_line_continuation_EOF2s���K�B��
�
�
�{�
+�	�w���O�	�����W�.�.�/��8�
�
�
�{�
+�	�w���J�	�����W�.�.�/��8�	�	��	�	�s�B!�'B-�!B*�-B6zsys.executable requiredc���	tj�5}tj|dd�}tj|�\}}}|jd|�|jd|�|jd|�tj|dd�}tj|�\}}}|jd|�|jd|�|jd|�ddd�y#1swYyxYw)Nrr0sunexpected EOF while parsingsline 1�\zy = 6\sy = 6\r)rr r$r%r&r's      r�,test_line_continuation_EOF_from_file_bpo2180z8EOFTestCase.test_line_continuation_EOF_from_file_bpo2180<s���G�
�
�
�
!�	+�X�%�1�1�(�E�4�H�I�(�>�>�y�I�L�B��S��M�M�9�3�?��M�M�)�S�)��M�M�%��%�%�1�1�(�E�9�M�I�(�>�>�y�I�L�B��S��M�M�9�3�?��M�M�)�S�)��M�M�*�c�*�	+�	+�	+�s�C
C,�,C5N)�__name__�
__module__�__qualname__rrr(r�ignore_warnings�
SyntaxWarningr.r4�unittest�skipIf�sys�
executabler7��rrr
sb��
)�%�^�%�_�$�$�m�<�%�=�%�9��X�_�_����'�)B�C�
+�D�
+rBr�__main__)r?�testr�test.supportrrrr=�TestCaserr8�mainrArBr�<module>rHsI��5�
��"�&�(��@+�(�#�#�@+�D�z���H�M�M�O�rB