File: D:/Python311/Lib/test/__pycache__/test_syntax.cpython-311.opt-2.pyc
�
��Vc� � � � d dl Z d dlZd dlZd dlmZ G d� dej � � Zd� Zedk r ej � � dS dS )� N)�supportc �B � e Zd Z d%d�Zd� Zd� Zd� Zd� Zd � Zd
� Z d� Z
d� Zd
� Zd� Z
d� Z
d� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zej d� � � Zd� Zd� Zd� Zd� Zd� Zd� Zd � Z d!� Z!ej d"� � � Z"ej d#� � � Z#ej d$� � � Z$dS )&�SyntaxTestCase�
<testcase>�execNc
� � t |||� � | � d� � d S # t $ �r}
|r-t |
|� � s| � d|j z � � t j |t |
� � � � }|�| � d|��� � | � |
j |� � |�| � |
j
|� � |�| � |
j |� � |�| � |
j |� � | �!| � |
j
| � � Y d }
~
d S Y d }
~
d S d }
~
ww xY w)Nz#compile() did not raise SyntaxErrorzSyntaxError is not a %szSyntaxError did not contain )�compile�fail�SyntaxError�
isinstance�__name__�re�search�str�assertEqual�filename�lineno�offset�
end_lineno�
end_offset)�self�code�errtextr �mode�subclassr r r r �err�mos �$D:\Python311\Lib\test\test_syntax.py�_check_errorzSyntaxTestCase._check_error s� � � � =��D�(�D�)�)�)�$
�I�I�;�<�<�<�<�<��# � =� =� =��
I�
�3�� 9� 9�
I�� � �3�h�6G�G�H�H�H���7�C��H�H�-�-�B��
I�� � � �g�g�G�H�H�H����S�\�8�4�4�4��
5�� � ���V�4�4�4��
5�� � ���V�4�4�4��
=�� � ����<�<�<��
=�� � ����<�<�<�<�<�<�<�<�<�
=�
=�
=�
=�
=�
=����� =���s �+ �E�C:D<�<Ec �6 � | � ddd�� � d S )Nzprint(end1 + end2 = ' ')z=expression cannot contain assignment, perhaps you meant "=="?� )r �r �r s r �test_expression_with_assignmentz.SyntaxTestCase.test_expression_with_assignment6 s2 � ����&�K�� �
�
�
�
�
� c �6 � | � ddd�� � d S )Nzf{}�invalid syntax�single�r r"