Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_fstring.cpython-312.opt-1.pyc

�

'Μgi�����ddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
mZdZGd�dej �Zedk(rej$�yy)	�N)�support)�temp_cwd)�assert_python_failure�assert_python_okzglobal variablec��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zej*ej.d�d��Zej*ej.d�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d �Z%d!�Z&d"�Z'd#�Z(d$�Z)d%�Z*d&�Z+d'�Z,d(�Z-d)�Z.d*�Z/d+�Z0d,�Z1d-�Z2d.�Z3d/�Z4d0�Z5d1�Z6d2�Z7d3�Z8d4�Z9d5�Z:d6�Z;d7�Z<d8�Z=d9�Z>d:�Z?d;�Z@d<�ZAd=�ZBd>�ZCd?�ZDd@�ZEdA�ZFdB�ZGdC�ZHdD�ZIdE�ZJdF�ZKdG�ZLdH�ZMdI�ZNdJ�ZOdK�ZPdL�ZQdM�ZRdN�ZSdO�ZTdP�ZUdQ�ZVdR�ZWdS�ZXdT�ZYdU�ZZyV)W�TestCasec���|D]C}|j|��5|j||�5t|�ddd�ddd��Ey#1swY�xYw#1swY�\xYw)N��str)�subTest�assertRaisesRegex�eval)�self�exception_type�regex�
error_stringsrs     �./usr/local/lib/python3.12/test/test_fstring.py�assertAllRaisezTestCase.assertAllRaise!sO�� �C����#��&��+�+�N�E�B���I�C�'�&�!�B�B��'�&�s!�A�A
�A�
A�A�A	c�B�Gd�d�}|�}|�}tjd�|�|_|j|�t	|��|j|�d�|jt	|�t	|��|j|jd�d�|j|jd�d�|jt|�j|d�d�|jt|�j|d�d�y)Nc��eZdZd�Zy)�(TestCase.test__format__lookup.<locals>.Xc��y)N�class��r�specs  r�
__format__z3TestCase.test__format__lookup.<locals>.X.__format__*s���N��__name__�
__module__�__qualname__rrrr�Xr)s��
rr#c��y)N�instancerrs  r�<lambda>z/TestCase.test__format__lookup.<locals>.<lambda>2s��:rr�r%)�types�
MethodTyper�assertEqual�format�type)rr#�x�ys    r�test__format__lookupzTestCase.test__format__lookup's���	�	�
�C��
�C���'�'�(E�q�I������A�3����+����A�3��)�������F�1�I�.�
	
������b�)�7�3�������b�)�:�6�	
����a��+�+�A�r�2�G�<�����a��+�+�A�r�2�G�<rc���Gd�d�}|�}d}tj|�}t|dd�}|j|j�t|�|j
|j�y)Nc��eZdZd�Zd�Zy)�TestCase.test_ast.<locals>.Xc��d|_y)NF��called�rs r�__init__z%TestCase.test_ast.<locals>.X.__init__Es	��#��rc��d|_y)NT�r4r6s r�__call__z%TestCase.test_ast.<locals>.X.__call__Hs��"���rN)r r!r"r7r:rrrr#r2Ds��
$�
rr#�
a = 10
f'{a * x()}'r'�exec)�ast�parse�compile�assertFalser5r<�
assertTrue)rr#r-�expr�t�cs      r�test_astzTestCase.test_astBsh��	�	�
�C����
�I�I�d�O���A�r�6�"��	
������"�	
�Q��	
������!rc�F�d}tj|�}|jt|�tj�|jt|j�d�|jt|jd�tj�|j|jdjd�|jt|jd�tj�|jt|jdj�tj�|jt|jdjj�d�|jt|jdjjd�tj�|j|jdjd�|j|jdjjd�|j|jdjjdjd�|jdjjdj}|jt|�tj�|jt|j�tj �|jt|j"�tj$�|jt|j&�tj(�|j|jd�|j|jjd�|j|j&jd�|j|j*d�|j|jj*d�|j|j&j*d�y)Nr;�r���)r=r>r*r,�Module�len�body�Assign�lineno�Expr�value�	JoinedStr�values�FormattedValue�BinOp�left�Name�op�Mult�right�Call�
col_offset�rrBrC�binops    r�test_ast_line_numberszTestCase.test_ast_line_numbers\s�����
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(�����a�f�f�Q�i��#�*�*�5���������)�)�1�-�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M���������)�)�1�-�����������/�/��3�����������/�/��2�9�9�1�=����q�	���&�&�q�)�/�/������e��c�i�i�0�����e�j�j�)�3�8�8�4�����e�h�h�����2�����e�k�k�*�C�H�H�5�������q�)�������*�*�A�.�������+�+�Q�/�����)�)�1�-�������.�.��2�������/�/��3rc���d}tj|�}|jt|�tj�|jt|j�d�|jt|jd�tj�|jt|jdj�tj�|j|jdjd�|jt|jd�tj�|jt|jdj�tj�|jt|jdjj�d�|jt|jdjjd�tj�|jt|jdjjdj�t�|jt|jdjjd�tj�|jt|jdjjd�tj�|jt|jdjjdj�t�|jt|jdjjd�tj�|j|jdjd�|j|jdjjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|jdjjdj}|jt|�tj�|jt|j �tj"�|jt|j$�tj&�|jt|j(�tj*�|j|jd�|j|j jd�|j|j(jd�|j|j,d�|j|j j,d�|j|j(j,d�|jdjjdj}|jt|�tj�|jt|j �tj"�|jt|j$�tj.�|jt|j(�tj*�|j|jd�|j|j jd�|j|j(jd�|j|j,d	�|j|j j,d	�|j|j(j,d
�y)Nz8
f'no formatted values'
f'eggs {a * x()} spam {b + y()}'rGrrHr9rI����)r=r>r*r,rKrLrMrPrQrRrOrS�ConstantrrTrUrVrWrXrYrZr[r\�Add)rrBrC�binop1�binop2s     r�.test_ast_line_numbers_multiple_formattedvaluesz7TestCase.test_ast_line_numbers_multiple_formattedvalues{sw��$��
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>���������)�)�1�-�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�=�=�>��D�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�=�=�>��D�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M���������)�)�1�-�����������/�/��3�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=��������'�'��*�0�0������f��s�y�y�1�����f�k�k�*�C�H�H�5�����f�i�i��#�(�(�3�����f�l�l�+�S�X�X�6��������*�������+�+�Q�/�������,�,�a�0�����*�*�A�.�������/�/��3�������0�0�"�5��������'�'��*�0�0������f��s�y�y�1�����f�k�k�*�C�H�H�5�����f�i�i��#�'�'�2�����f�l�l�+�S�X�X�6��������*�������+�+�Q�/�������,�,�a�0�����*�*�B�/�������/�/��4�������0�0�"�5rc�^
�d}tj|�}|jt|�tj�|jt|j�d�|jt|jd�tj�|j|jdjd�|jt|jd�tj�|jt|jdj�tj�|jt|jdjj�d�|jt|jdjjd�tj�|j|jdjd�|j|jdjjd�|j|jdjjdjd�|jdjjdj}|jt|�tj�|jt|j�tj �|jt|j"�tj$�|jt|j&�tj�|j|jd�|j|jjd�|j|j&jd�|j|j(d�|j|jj(d�|j|j&j(d�|jt|j&j�d�|jt|j&jd�tj*�|jt|j&jdj�t,�|jt|j&jd�tj�|jt|j&jd�tj*�|jt|j&jdj�t,�|j|j&jdjd�|j|j&jdjd�|j|j&jdjd�|j&jdj}|jt|�tj.�|j|jd�|j|j(d�y)Nz
a = 10
f'{a * f"-{x()}-"}'rGrrHrIrJ�)r=r>r*r,rKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr\rerr[)rrBrCr^�calls     r�test_ast_line_numbers_nestedz%TestCase.test_ast_line_numbers_nested�si����
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(�����a�f�f�Q�i��#�*�*�5���������)�)�1�-�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M���������)�)�1�-�����������/�/��3�����������/�/��2�9�9�1�=����q�	���&�&�q�)�/�/������e��c�i�i�0�����e�j�j�)�3�8�8�4�����e�h�h�����2�����e�k�k�*�C�M�M�:�������q�)�������*�*�A�.�������+�+�Q�/�����)�)�1�-�������.�.��2�������/�/��3�����U�[�[�/�/�0�!�4�����e�k�k�0�0��3�4�c�l�l�C�����e�k�k�0�0��3�9�9�:�C�@�����e�k�k�0�0��3�4�c�6H�6H�I�����e�k�k�0�0��3�4�c�l�l�C�����e�k�k�0�0��3�9�9�:�C�@�������+�+�A�.�5�5�q�9�������+�+�A�.�5�5�q�9�������+�+�A�.�5�5�q�9��{�{�!�!�!�$�*�*������d��S�X�X�.�������a�(�������"�-rc���d}tj|�}|jt|�tj�|jt|j�d�|jt|jd�tj�|j|jdjd�|jt|jd�tj�|jt|jdj�tj�|jt|jdjj�d�|jt|jdjjd�tj�|jt|jdjjd�tj�|jt|jdjjdj�t�|jt|jdjjd�tj�|jt|jdjjd�tj�|jt|jdjjdj�t�|jt|jdjjd�tj�|j|jdjd�|j|jdjjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|jdjjdj}|jt|�tj �|jt|j"�tj$�|jt|j&�tj(�|jt|j*�tj,�|j|jd�|j|j"jd�|j|j*jd�|j|j.d�|j|j"j.d�|j|j*j.d�|jdjjdj}|jt|�tj �|jt|j"�tj$�|jt|j&�tj(�|jt|j*�tj,�|j|jd�|j|j"jd�|j|j*jd�|j|j.d	�|j|j"j.d	�|j|j*j.d
�|jdjjdj}|jt|�tj �|jt|j"�tj$�|jt|j&�tj(�|jt|j*�tj,�|j|jd�|j|j"jd�|j|j*jd�|j|j.d�|j|j"j.d�|j|j*j.d�y)
Nz)
a = 10
f'{a * x()} {a * x()} {a * x()}'
rGrrH�rIr9rJ�
�rcrd)r=r>r*r,rKrLrMrNrOrPrQrRrSrTrerrUrVrWrXrYrZr[r\r]s    r�*test_ast_line_numbers_duplicate_expressionz3TestCase.test_ast_line_numbers_duplicate_expression�s�����
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(�����a�f�f�Q�i��#�*�*�5���������)�)�1�-�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�=�=�>��D�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�=�=�>��D�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M���������)�)�1�-�����������/�/��3�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=����q�	���&�&�q�)�/�/������e��c�i�i�0�����e�j�j�)�3�8�8�4�����e�h�h�����2�����e�k�k�*�C�H�H�5�������q�)�������*�*�A�.�������+�+�Q�/�����)�)�1�-�������.�.��2�������/�/��3����q�	���&�&�q�)�/�/������e��c�i�i�0�����e�j�j�)�3�8�8�4�����e�h�h�����2�����e�k�k�*�C�H�H�5�������q�)�������*�*�A�.�������+�+�Q�/�����)�)�2�.�������.�.��3�������/�/��4����q�	���&�&�q�)�/�/������e��c�i�i�0�����e�j�j�)�3�8�8�4�����e�h�h�����2�����e�k�k�*�C�H�H�5�������q�)�������*�*�A�.�������+�+�Q�/�����)�)�2�.�������.�.��3�������/�/��4rc��tjd�}|jt|j�d�|j|jdj
d�|jt
|jd�tj�|jt
|jdj�tj�|jt|jdjj�d�|jt
|jdjjd�tj�|jt
|jdjjd�tj�|jt
|jdjjd�tj�|jdjj\}}}|j}|jt
|�tj�|j|j
d�|j|jd�|j|jd�|j|j d�y)Nz%f"Here is that pesky {xxx:.3f} again"rHrrIrG��)r=r>r*rLrMrOr,rPrQrRrSrerTrW�
end_linenor\�end_col_offset)rrC�_rB�names     r�(test_ast_numbers_fstring_with_formattingz1TestCase.test_ast_numbers_fstring_with_formattings����I�I�=�>������Q�V�V��a�(���������)�)�1�-�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G��V�V�A�Y�_�_�+�+�
��4���z�z������d��S�X�X�.�������a�(�������!�,�������"�-�����,�,�b�1rc�n�d}tj|�}|jt|�tj�|jt|j�d�|jt|jd�tj�|j|jdjd�|jt|jd�tj�|jt|jdj�tj�|jt|jdjj�d�|jt|jdjjd�tj�|jt|jdjjdj�t�|jt|jdjjd�tj�|jt|jdjjd�tj�|jt|jdjjdj�t�|j|jdjd�|j|jdjjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdj d�|j|jdjj d�|j|jdjjdj d�|j|jdjjdj d�|j|jdjjdj d�|jdjjdj}|jt|�tj"�|jt|j$�tj&�|jt|j(�tj*�|jt|j,�tj.�|j|jd�|j|j$jd�|j|j,jd�|j|j d�|j|j$j d�|j|j,j d	�d
}tj|�}|jt|�tj�|jt|j�d�|jt|jd�tj�|jt|jdj�tj�|jt|jdjj�d�|jt|jdjjd�tj�|j|jdjd�|j|jdjjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdjjdjd�|j|jdj d�|j|jdjj d�|j|jdjjdj d�|j|jdjjdj d�|j|jdjjdj d
�|j|jdjjdjjd�|j|jdjjdjj0d�|j|jdjjdjj d�|j|jdjjdjj2d�y)Nz?
a = 10
f'''
  {a
     *
       x()}
non-important content
'''
rGrrHrIr9�rkrJz$
a = f'''
          {blech}
    '''
ra�
rq�)r=r>r*r,rKrLrMrNrOrPrQrRrSrerrTr\rUrVrWrXrYrZr[rvrwr]s    r�'test_ast_line_numbers_multiline_fstringz0TestCase.test_ast_line_numbers_multiline_fstring4s�����
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(�����a�f�f�Q�i��#�*�*�5���������)�)�1�-�����a�f�f�Q�i��#�(�(�3�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�=�=�>��D�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�,�,�G�����a�f�f�Q�i�o�o�4�4�Q�7�=�=�>��D���������)�)�1�-�����������/�/��3�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=���������-�-�q�1�����������3�3�Q�7�����������/�/��2�=�=�q�A�����������/�/��2�=�=�q�A�����������/�/��2�=�=�r�B����q�	���&�&�q�)�/�/������e��c�i�i�0�����e�j�j�)�3�8�8�4�����e�h�h�����2�����e�k�k�*�C�H�H�5�������q�)�������*�*�A�.�������+�+�Q�/�����)�)�1�-�������.�.��2�������/�/��3���

�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(�����a�f�f�Q�i��#�*�*�5�����a�f�f�Q�i�o�o�.��
�
�>�����Q�V�V�A�Y�_�_�3�3�4�a�8�����a�f�f�Q�i�o�o�4�4�Q�7�8�#�:L�:L�M���������)�)�1�-�����������/�/��3�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=�����������/�/��2�9�9�1�=���������-�-�q�1�����������3�3�Q�7�����������/�/��2�=�=�q�A�����������/�/��2�=�=�r�B�����������/�/��2�=�=�r�B�����������/�/��2�8�8�?�?��C�����������/�/��2�8�8�C�C�Q�G�����������/�/��2�8�8�C�C�R�H�����������/�/��2�8�8�G�G��Lrc�^
�d}tj|�}|jt|�tj�|jt|j�d�|jdj}|jt|�tj�|j|jd�|j|jd�|j|jd�|j|jd�|jdjjd}|jt|�tj�|j|jd�|j|jd�|j|jd�|j|jd�|jdjjdj}|jt|�tj�|j|jd�|j|jd�|j|jd	�|j|jd
�d}tj|�}|jt|�tj�|jt|j�d�|j\}}|jj D�cgc]}|j|jf��}	}|j#t%d
�|	D���|jj D�cgc]}|j|jf��}	}|j#t%d�|	D���d}tj|�}|jt|�tj�|jt|j�d�|jdjj d}
|jt|
�tj�|jt|
j�d�|
j\}}}
|jt|�tj&�|j|jd�|j|jd�|j|jd�|j|jd�|j}|jt|�tj�|j|jd�|j|jd�|j|jd�|j|jd�|jt|
�tj&�|j|
jd�|j|
jd�|j|
jd�|j|
jd�|j|
jd�ycc}wcc}w)Nz
x = (
    f" {test(t)}"
)rHrrIr9rqrJr~ra�z�
x = (
    u'wat',
    u"wat",
    b'wat',
    b"wat",
    f'wat',
    f"wat",
)

y = (
    u'''wat''',
    u"""wat""",
    b'''wat''',
    b"""wat""",
    f'''wat''',
    f"""wat""",
)
        rGc3�&K�|]	}|dk(���y�w))r9r}Nr��.0�offsets  r�	<genexpr>zBTestCase.test_ast_line_numbers_with_parentheses.<locals>.<genexpr>������D�G�&�F�g�-�G���c3�&K�|]	}|dk(���y�w))r9�Nrr�s  rr�zBTestCase.test_ast_line_numbers_with_parentheses.<locals>.<genexpr>�r�r�zv
x = (
        'PERL_MM_OPT', (
            f'wat'
            f'some_string={f(x)} '
            f'wat'
        ),
)
ror��rd�r|� �)r=r>r*r,rKrLrMrQrRrOrvr\rwrSrTr[�eltsrA�allre)rrBrC�	joinedstr�fvrlr-r.�elt�offsets�fstring�wat1�middle�wat2s              r�&test_ast_line_numbers_with_parenthesesz/TestCase.test_ast_line_numbers_with_parentheses�s�����
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(��F�F�1�I�O�O�	�����i��#�-�-�8�����)�)�1�-�����-�-�q�1�����-�-�q�1�����1�1�2�6�
�V�V�A�Y�_�_�
#�
#�A�
&������b��3�#5�#5�6�������A�&��������*��������*�����*�*�B�/��v�v�a�y���%�%�a�(�.�.������d��S�X�X�.�������a�(�������!�,�������!�,�����,�,�b�1���&
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(��v�v���1�DE�7�7�<�<�P�<�C�C�N�N�C�$6�$6�7�<��P�����D�G�D�D�E�DE�7�7�<�<�P�<�C�C�N�N�C�$6�$6�7�<��P�����D�G�D�D�E���
�I�I�d�O������a��#�*�*�-�����Q�V�V��a�(��&�&��)�/�/�&�&�q�)������g���
�
�6�����W�^�^�,�a�0�$�^�^���f�d�����d��S�\�\�2�������a�(�������!�,�������"�-�����,�,�b�1��|�|������d��S�X�X�.�������a�(�������!�,�������"�-�����,�,�b�1�����d��S�\�\�2�������a�(�������!�,�������"�-�	
����,�,�b�1�����/�/��4��]Q��Qs�,Z%�Z*c��d}tj|�}|jt|�tj�|jt|j�d�|jdj}|jt|�tj�|jt|j�d�|jd}|jt|�tj�|j}|jt|�tj�|jt|j�d�y)Nz
f'{expr:}'rHr)r=r>r*r,rKrLrMrQrRrSrT�format_spec)rrB�modr�r�r�s      r�"test_ast_fstring_empty_format_specz+TestCase.test_ast_fstring_empty_format_spec�s������i�i��o������c��C�J�J�/�����S�X�X���*��(�(�1�+�#�#������g���
�
�6�����W�^�^�,�a�0�
�^�^�A�
������b��3�#5�#5�6��n�n������k�*�C�M�M�:�����[�/�/�0�!�4rc�|�d�}|j|j�d�}|j|j�y)Nc��y�Nrrrr�fz"TestCase.test_docstring.<locals>.f�s��rc��yr�rrrr�gz"TestCase.test_docstring.<locals>.gs��!r)�assertIsNone�__doc__)rr�r�s   r�test_docstringzTestCase.test_docstring�s4��	#�	
���!�)�)�$�	&�	
���!�)�)�$rc��|jtd�5tjd�ddd�y#1swYyxYw)Nzmalformed node or stringzf'x')r
�
ValueErrorr=�literal_evalr6s r�test_literal_evalzTestCase.test_literal_evals.��
�
#�
#�J�0J�
K����V�$�L�
K�
K�s�6�?c��dg}d}tj|�}t|dd�}t|�|j	|dd�y)Nr'zx[0] = 'foo' f'{3}'r<r�foo3)r=r>r?r<r*)rr-rBrCrDs     r�test_ast_compile_time_concatz%TestCase.test_ast_compile_time_concatsD��
�D��(���I�I�d�O���A�r�6�"���Q������1��v�&rc�6�|jtdddg�y)Nz&cannot mix bytes and nonbytes literalszf'' b''zb'' f''�r�SyntaxErrorr6s r�test_compile_time_concat_errorsz(TestCase.test_compile_time_concat_errorss!������4���
�	
rc�p�|j�d�|jdd�|jdd�y)Nr'�a� �r*r6s r�test_literalzTestCase.test_literals2������b�!����1�s�#����1�s�#rc�6�|jtdgd��y)Nzunterminated string)zf'{"x'zf'{"x}'zf'{("x'zf'{("x}'r�r6s r�test_unterminated_stringz!TestCase.test_unterminated_string#s������!�
�		
rzexhausts limited stack on WASIc�*�|jtddg�|jtddg�|jtddg�|jtddg�|jtdd	g�|jttd
�y)Nz@closing parenthesis '\}' does not match opening parenthesis '\('zf'{((}'z@closing parenthesis '\)' does not match opening parenthesis '\['z	f'{a[4)}'z@closing parenthesis '\]' does not match opening parenthesis '\('z	f'{a(4]}'z@closing parenthesis '\}' does not match opening parenthesis '\['zf'{a[4}'zf'{a(4}'a�f'{((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((}')rr��assertRaisesrr6s r�test_mismatched_parenszTestCase.test_mismatched_parens/s�������S��
�	
�	
����S��
�	
�	
����S��
�	
�	
����S��
�	
�	
����S��
�	
�	
���+�t�-E�Frc�|��|jtddg��fd��|jtd�d�g�y)Nz'f-string: expressions nested too deeplyzf"{1+2:{1+2:{1+1:{1}}}}"c�2��|dk(ry�|dz
�}d|�d�S)Nrz1+1rHzf"{z}"r)�n�prev�create_nested_fstrings  �rr�zFTestCase.test_fstring_nested_too_deeply.<locals>.create_nested_fstring^s*����A�v��(��Q��/�D��$��s�#�#rztoo many nested f-strings�r�)rr�s @r�test_fstring_nested_too_deeplyz'TestCase.test_fstring_nested_too_deeplyVsC�������5�
'�(�	
�	$�	
����4�7L�S�7Q�6R�	
rc�4�|jtddg�y)N�invalid syntaxa�f"{1 1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:r�r6s r�#test_syntax_error_in_nested_fstringz,TestCase.test_syntax_error_in_nested_fstringhs������)�,G�+H�	
rc���|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jd	d	�|jd
d
�|jdd�|jdd�|jd
d
�|jdd�|jdd�|jdd�|jdd��d�|jdd��d�|jdd��d�|jdd��d�|jd�d�d�|jd�d�d�|jd�d�d�|jd�d�d�|jd�d�|jtddg�y) N�{za{z{bza{b�}za}z}bza}bz{}za{}z{b}z{}cza{b}za{}cz{b}cza{b}cr}z{10z}10z}{z}{10z}a{z}a{10z10{z10}z10}{z}a{}z10}a{}z{{}}zunhashable typezf'{ {{}} }')r*r�	TypeErrorr6s r�test_double_braceszTestCase.test_double_bracesns������2��$����3��&����3��&����4�%�(����2��$����3��&����3��&����4�%�(����4�$�'����5�5�)����5�5�)����5�5�)����6�F�+����6�F�+����6�F�+����7�W�-����2�b�T��E�*����2�b�T��E�*����4��t��f�-����5����w�/����B�4�r��E�*����B�4�r��E�*����B�4�t��f�-����B�4�z�)�8�4�	
���F�8�f�-�������
�	
rc�*�d}|jd|�d�d�|jd|�d�d�|jd|�d|d��d�|jd	|��d
�|jd|��d�|jd	|��d
�|jd
|��d�|jd|��d�|jd|��d�|j|�d�d�|j|�d�|j|�d�|j|�d�|j|�d�d�|jd|�d�d�|jd|��d�|j|�d|��d�|j�d�|j�d�|j�d�|j�d�|j�d�|j�d�|j�d�|jd�d�|jtddg�y)N�defzabc## �ghizabc## defghi�abc�	abcdefghi�4z
abcdefghidef z{x}z{x}defz{xz{xdefz{{x}}z{{x}}defz{{xz{{xdefzx}}zx}}defzdefx}}�2�def2�1�1def2�1def�-zdef-defr'z fz
expecting '}'z
f'{3' f"}"�r*rr��rr-s  r�test_compile_time_concatz!TestCase.test_compile_time_concat�s&��������Q�C�s�+�^�<�����!��e�+�[�9�����!��h�q��e�4�o�F�����!���x�0��������g�.�����!���x�0�����A�3���4�����!���x�0�����!���x�0����A�3���x�0����A�3�E�*����q�c�u�-����q�c�E�*����A�3���V�,������s�C���1������s��V�,����A�3�!�A�3���3������$�����B�'������+�����b�!������$�����R�(������+�	
���D�6�D�)������ �
�	
rc���ddi}|jd�d�|j|d�d�|jtdgd��|jtddg�|jdd��d	�|jd
d��d�|jd
d��d�|jd
d��d�|jd
d��d�|jtddg�y)N�#�hashz'{' was never closed)zf'{1#}'zf'{#}'zf'one: {1#}'z(f'{1# one} {2 this is a comment still#}'�f-string: unmatched '\)'zf'{)#}'zA complex trick: rGzA complex trick: 2�
�*z
42z
# this is not a comment
r|z
# this is not a comment
6�Vz
86�.f-string: valid expression required before '}'zf'''
{
# only a comment
}'''
r��r�ds  r�
test_commentszTestCase.test_comments�sQ��
�&�M�����C�5�3�'����A�c�F�8�f�-�����"�
�		
�	
����'��
�	
�	
���!��"�
�
!�		
�	
������
�
�	
�	
������
�
�	
�	
������
�

+�
	
�	
������
�

�
	
�	
����=��
�
	
rc�l�dd�}d}d}tdd�D])}|jt||��|dz|z��+|jt|d�dz�|dzd	z�|d
d�}|jt|�|dzdz�d
dz}|jt|�d�y)Nc��dd|zz|zdzS)N�f'z{x} �'r)r��extras  r�
build_fstrz2TestCase.test_many_expressions.<locals>.build_fstrs���6�A�:�&��.��4�4rr#rH�ir���i��z{x:{width}} �zf'{1}' 'x' 'y'i�1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy)r')�ranger*r)rr�r-�width�i�ss      r�test_many_expressionszTestCase.test_many_expressionss���
	5�
�����s�C��A����T�*�Q�-�0�1�s�7�a�-�@�!�	
����j��o��3�4�q�3�w�9�6M�N��s�N�+������a��1�s�7�c�/�2�
�t�#������a��,�/rc	�:�d}d}tjd�}|jd||�d|����d�|jd||�d|����d�|jd||d�d|d����d�|jd|d	�d
d�d|d����d�|jd|d	�d
d�d|d����d�|jddd	�d��d
�|jdd�dd
�d���d
�|jddd�dd
�d��d�|jdd�dd	�dd���d�|jdddddik7xr|�d��d
�|jd||d
��d|d����d�|jtddg�|jtddg�|jtddg�y)Nr}r9z12.34567zresult: �.zresult:      12.35�0r�rHrr��0xz
       0xar-i����r�z
      -0xarIrozf-string: expecting ':' or '}'zf'{"s"!r{":10"}}'�0f-string: expecting a valid expression after '{'zf'{4:{/5}}'�&f-string: invalid conversion characterzf'{"s"!{"r"}}')�decimal�Decimalr*rr�)rr��	precisionrQs    r�!test_format_specifier_expressionsz*TestCase.test_format_specifier_expressions%s:�����	����
�+�����8�E�5�'��9�+�)=�#>�?�AU�V����8�E�5�)�1�Y�K�)?�#@�A�CW�X�����u�e�A�Y�a�	�!�}�4�5�6�8L�	
�	
����u�a�S��1��Q�y��m�3�4�5�7K�	
�	
����u�q�T�1�Q��q�)�A��6�7�8�:N�	
�	
���B�q���2�g�;��6����B��u�A�a�S���o�.��>����C��#��a��s�!�|�,�|�<����C���Q�q�c��3�%�/�0�<�@����B�q��q��e��!5�� 6�a�7�8�<�H�����u�e�Q�C�[��)�A��6�7�8�:N�	
�	
����,�'�
�	
�	
����>��
�	
�	
����4�%�
�	
rc���Gd�d�}|j|�d�d�|j|�d�d�|jt�5tdd|i�ddd�y#1swYyxYw)Nc��eZdZd�Zy)�;TestCase.test_custom_format_specifier.<locals>.CustomFormatc��|Sr�r)rr�s  rrzFTestCase.test_custom_format_specifier.<locals>.CustomFormat.__format__Ys��"�"rNrrrr�CustomFormatrXs��
#rrr�u☃uf"{F():¯\_(ツ)_/¯}"�F)r*�assertWarns�
SyntaxWarningr<)rrs  r�test_custom_format_specifierz%TestCase.test_custom_format_specifierWsf��	#�	#�	
���L�N�2�.��6����L�N�6�2�U�;�
�
�
�m�
,��*�S�,�,?�@�-�
,�
,�s�A*�*A3c�T�Gd�d�}|�}|j|�d|��d�y)Nc��eZdZd�Zd�Zy)�*TestCase.test_side_effect_order.<locals>.Xc��d|_y)Nr)r�r6s rr7z3TestCase.test_side_effect_order.<locals>.X.__init__cs	����rc�V�|xjdz
c_t|j�S)NrH)r�rrs  rrz5TestCase.test_side_effect_order.<locals>.X.__format__fs�����!����4�6�6�{�"rN)r r!r"r7rrrrr#rbs��
�
#rr#r�z1 2r�)rr#r-s   r�test_side_effect_orderzTestCase.test_side_effect_orderas/��	#�	#�
�C�����A�3�a��s��U�+rc��|jtdgd��|jtdgd��|jtdgd��|jtdgd��|jtd	d
dg�y)Nr�)zf'{}'z
f'{ }'f' {} 'zf'{10:{ }}'zf' { } 'z
f'''{	
}'''z.f-string: valid expression required before '!')zf'{!r}'zf'{ !r}'zf'{!}'zf'''{	
!a}'''zf'{!'zf'{!s:'zf'{!x}'z	f'{ !xr}'zf'{!x:}'z	f'{!x:a}'z
f'{ !xr:}'zf'{ !xr:a}'z.f-string: valid expression required before ':')zf'{:}'zf'{ :!}'zf'{:2}'zf'''{	
:a}'''zf'{:'zF'{[F'{:'}[F'{:'}]]]z.f-string: valid expression required before '=')zf'{=}'zf'{ =}'zf'{ =:}'z
f'{   =!}'zf'''{	
=}'''zf'{='z'invalid non-printable character U\+00A0uf'''{ }'''� r�r6s r�test_missing_expressionz TestCase.test_missing_expressionms�������<�
�	
�	
����<�
�	
�.	
����<�
�	
�	
����<�
�	
�	
����6���
�	
rc��|jd�d�|jtddg�|jtddg�y)N)rIz(3,)r�zf'{,}'r�z
f'{3)+(4}'r�r6s r�test_parens_in_expressionsz#TestCase.test_parens_in_expressions�sN�����B�4�&�)�����>��
�	
�	
����'��
�	
rc�6�|jtdgd��y)Nr�)zf'{.}'z
f'{.}'z

f'{.}'r�r6s r�!test_newlines_before_syntax_errorz*TestCase.test_newlines_before_syntax_error�s������>�0�	
rc�J�|jdd�|jdd�|jdd�|jd�d�d�|jd�dd��d�|jdd��d�|jdd�|jd	d	�|jd	d	�|jd�d�d
�|jd�dd��d�|jdd��d�|jdd�|jd
d
�|jd
d
�|jd�d�d
�|jd�dd��d�|jdd��d�|jdd�|jd�d�d
�|jd�dd��d�|jdd��d�|jd
d
�|jdd�|jdd�|jdd�|jdd�|jdd�|jd�d�d�|jd�dd��d�|jdd��d�|jdd�|jdd�|jdd�|jt�5td�}ddd�|jd�|jt�5td�}ddd�|j|d�|jdd��d�|jdd��d�d}|jdd�|jd|��d�|jd|��d�|jdd�y#1swY��xYw#1swY��xYw)N�	z\trGz2	rIz2	3z	3uΔz\u0394u2Δu2Δ3uΔ3z
\U00000394r�z\x20z2 z2 3z 3z	f'\{6*7}'z\42zf'\g'z\g�\r��spam�&z\Nz\Nspamz\&)r*rrr)rrQ�	AMPERSANDs   r�test_backslashes_in_string_partz(TestCase.test_backslashes_in_string_part�s������2��%������&����B��'����A�3�b��5�)����A�3�b����f�-����2�a�S��5�)����6�H�-�����I�.����F�Y�/����A�3�f��y�1����A�3�f�Q�C��*�5����6�!���y�1����:��1�����
�6����J��7����A�3�j�)�9�5����A�3�j���,�j�9����:�a�S�)�9�5����9�H�E����A�3�<�=�y�I����A�3�<�Q�C�@�*�M����9�!��=�y�I����:�Y�G����;�j�I����:�Y�G����4�#�&�����'�*����D�7�+����A�3�d��T�*����A�3�d�1�#���.����4��s��T�*����5�4�(����6�E�*����5�4�(�
�
�
�m�
,���&�E�-������'�
�
�
�m�
,���N�E�-������&����2�c�U��V�,����A�c�U��V�,��	�	
���=�3�/����3�y�k�*�I�6����B�y�k�*�I�6����?�U�3�-�
,��-�
,�s�1N
�,N�
N�N"c�6�|jtdgd��y)Nzi\(unicode error\) 'unicodeescape' codec can't decode bytes in position .*: malformed \\N character escape)
zf'\N'zf'\N 'zf'\N  'zf'\N{'z f'\N{GREEK CAPITAL LETTER DELTA'z'\N'z'\N 'z'\N  'z'\N{'z'\N{GREEK CAPITAL LETTER DELTA'r�r6s r�%test_misformed_unicode_character_namez.TestCase.test_misformed_unicode_character_names��	
����x�

�	
rc���|jd�d�|jdd�|jd�d�|jd�d�|jtddg�y)NrI�3r�r�zf'{
}'r�r6s r�#test_backslashes_in_expression_partz,TestCase.test_backslashes_in_expression_part!sv�������
�	
�	
���1�3�7����4�5��<����5�6��=�����<��
�	
rc��dD��cgc]}dD]}|j|�����}}}|jtd|�ycc}}w)N)z{expr}z
f'{{{expr}}}'zrf'{{{expr}}}')z\'a\'z\t3r)rBz,unexpected character after line continuation)r+rr�)r�
formattingrB�casess    r�/test_invalid_backslashes_inside_fstring_contextz8TestCase.test_invalid_backslashes_inside_fstring_context6sd��
�
��
�
��

���4��(��

)��	�
�	
����G��	
��
s� Ac��|jdd�|jdd�|jdd�|jdd�y)z@
        Only literal curly braces begin an expression.
        z{1+1}z{1+1Nr�r6s r�test_no_escapes_for_bracesz#TestCase.test_no_escapes_for_bracesJsE��
	
���9�w�/����7�V�,����9�v�.����K�g�Vrc�P�|jd�d�|jd�d�y)Nrr�rJ�7r�r6s r�test_newlines_in_expressionsz%TestCase.test_newlines_in_expressionsTs/�����A�3��%�������	
rc����d�|j�fd�d��d�|j�fd�d�d�d�|j�fd�d�d�d	�|jtd
gd��|jtd�5t	d
dd�ddd�|jtd�5td�ddd�y#1swY�4xYw#1swYyxYw)Nroc����|zSr�r�r.r-s �rr&z&TestCase.test_lambda.<locals>.<lambda>^�	���a��cr�8z'88888'c����|zSr�rr-s �rr&z&TestCase.test_lambda.<locals>.<lambda>_r.r�10z
'88888'   c����|zSr�rr-s �rr&z&TestCase.test_lambda.<locals>.<lambda>`r.rz
88888     z@f-string: lambda expressions are not allowed without parentheses)zf'{lambda x:x}'zf'{lambda :x}'zf'{lambda *arg, :x}'zf'{1, lambda:x}'zf'{lambda x:}'z
f'{lambda :}'r�z)lambda name_3=f'{name_4}': {name_3}
1 $ 1z<string>r<r�zf'{+ lambda:None}')r*rr�r
r?rr�s @r�test_lambdazTestCase.test_lambda\s����
�����\�3�/�2�Y�?����\�3�/�"�5��E����\�3�/��3�l�C�
	
����Q�
�	
��
#�
#�K�1A�
B��@�*�f�U�C��
#�
#��K�
�
�%�&�
�
�	C�
B��
�
�s�	C
�5C�
C�Cc�v�|jd�d�|jd�d�|jd�d�y)NrHr�rGr�rIr r�r6s r�test_valid_prefixeszTestCase.test_valid_prefixes|s8�����A�3��%����Q�C�#�&����Q�C�#�&rc��|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�y)Nz\'z\"z\"\'z\'\"z\"\'\"z\'\"\'z\"\'\"\'r�r6s r�test_roundtrip_raw_quotesz"TestCase.test_roundtrip_raw_quotes�ss�����B��'����B��'����D�9�-����D�9�-����F�\�2����F�\�2����H�'7�8rc���gd�}|D]\\}}|j||��5|jt�5t|�}ddd�|j	|�ddd��^|j	dd�|j	dd�|j	dd��d�|j	dd��d�|j	d�d�d	�y#1swY��xYw#1swY��xYw)
N))z	f'\{{\}}'�\{\})�f'\{{'�\{)zf'\{{{1+1}'�\{2)zf'\}}{1+1}'�\}2)zf'{1+1}\}}'�2\})�case�expected_resultr9r;rGr<z\}r=r>)rrrrr*)r�deprecated_casesr?r@�results     r�,test_fstring_backslash_before_double_bracketz5TestCase.test_fstring_backslash_before_double_bracket�s���
��&6�!�D�/����4���I��%�%�m�4�!�$�Z�F�5�� � ���9�J�I�&6�
	
���F�X�.����C�%�(����C��u��v�.����C��u��v�.����S�E���v�.�5�4��J�I�s"�C�C
�C�
C�C�C	c��|jt�5}td�ddd�|jt	j
�d�|j|j
djt�y#1swY�\xYw)Nr:rHr)rrrr*rL�warnings�category)r�ws  r�7test_fstring_backslash_before_double_bracket_warns_oncez@TestCase.test_fstring_backslash_before_double_bracket_warns_once�s]��
�
�
�m�
,����O�-�����Q�Z�Z��!�,�������A��/�/��?�-�
,�s�A=�=Bc��|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�y)Nrz\\z\\\\r�r6s r�!test_fstring_backslash_prefix_rawz*TestCase.test_fstring_backslash_prefix_raw�s������2��%����4�&�)����B��'����D�7�+����B��'����D�7�+����B��'����D�7�+����B��'����D�7�+����B��'����D�7�+rc�b�|jd��d�d�|jddd���d�d�y)NrHr�z1}z>3roz$                                  1}r�r6s r�(test_fstring_format_spec_greedy_matchingz1TestCase.test_fstring_format_spec_greedy_matching�s9�����A�Q�4�r��D�)����A�b���V�9�B��)O�Prc��d�}|d�}|jt|�d�|jt|�d�y)Nc3�*K�d|dz����d���y�w)Nzy:rGr)r.s r�fnzTestCase.test_yield.<locals>.fn�s�����q��s�����g�s�r9ra)r*�next)rrOr�s   r�
test_yieldzTestCase.test_yield�s:��	�
�q�E������a��!�$�����a��$�'rc��d�}|d�}t|�}|j|d�d�|j|jd�d�y)Nc3�&�K�d�fd�������y�w)N�x:c����|zSr�r)r�r-s �rr&z6TestCase.test_yield_send.<locals>.fn.<locals>.<lambda>�s	����A�rr�r-s`rrOz$TestCase.test_yield_send.<locals>.fn�s������o�.�/�0�0�s�r}r9�(�stringzx:string)rPr*�send)rrOr��
the_lambdas    r�test_yield_sendzTestCase.test_yield_send�sH��	1�
�r�F���!�W�
�����A���+��������)�:�6rc�4�|jd�d�|jd�d�|jd�d�|jd�d�|jd�d�|jd�d�|jd�d�|jd�d�y)Nr-zeric'szxeric"syzxeric"szeric"syr�r6s r�+test_expressions_with_triple_quoted_stringsz4TestCase.test_expressions_with_triple_quoted_strings�s������G�9�s�+����L�>�H�5�	
���0�1�J�?����,�-�	�:����,�-�	�:����4�5�
�C����8�9�J�G����9�:�Z�Hrc��d}d}|j|�|��d�|jd|�|��d�|j|�d|��d�|j|�|�d�d�|jd|�d|��d	�|jd|�|�d�d
�|j|�d|�d�d�|jd|�d|�d�d
�y)N�br��98abcr#�X98abc�98Xabc�98abcX�Y�X98Yabc�X98abcY�98XabcY�Z�X98YabcZr��rr-r.s   r�test_multiple_varszTestCase.test_multiple_vars�s����������A�3�q�c��G�,����1�Q�C��s��X�.����A�3�a��s��X�.����A�3�q�c���X�.����1�Q�C�q����i�0����1�Q�C��s�!��i�0����A�3�a��s�!��i�0����1�Q�C�q���1��z�2rc�~�d�}|j|d��d�|j|d��d�y)Nc����fd�}|S)Nc���d���S)NrTrrVs�r�innerz3TestCase.test_closure.<locals>.outer.<locals>.inner�s����A�3�x�rr)r-ros` r�outerz$TestCase.test_closure.<locals>.outer�s���
 ��Lr�987zx:987rJzx:7r�)rrps  r�test_closurezTestCase.test_closure�s9��	�	
�����u����1������q���U�+rc�|��d��fd�}|j|dd�d�d}|j|dd�d�y)NrGc���d|�z|���S�N�x=r)r-r�r.s  �rr�z"TestCase.test_arguments.<locals>.f�s�����!��U�G�}�%�%r�foor}zx=foofoo    �barzx=        20r�)rr�r-r.s   @r�test_argumentszTestCase.test_arguments�s@���
��	&�	
����5�"��~�6�������2�r��N�3rc�2�d}|jd|��d�y)N�{�v:zv:123r�)rrQs  r�test_localszTestCase.test_locals�s�������2�e�W��w�/rc�j�|jt�5dt��ddd�y#1swYyxYw)Nr|)r��	NameErrorrQr6s r�test_missing_variablezTestCase.test_missing_variable�s%��
�
�
�y�
)����L�*�
)�
)�s�
)�2c��Gd�d�}|j|�d�d�|j|��d�|j|���d�|jd��d�|jd��d�y)Nc��eZdZd�Zy)�,TestCase.test_missing_format_spec.<locals>.Oc��|sy|S)N�*rrs  rrz7TestCase.test_missing_format_spec.<locals>.O.__format__s
�����rNrrrr�Or�s��
rr�r-r�rIr r�)rr�s  r�test_missing_format_specz!TestCase.test_missing_format_specsv��	�	�	
���A�C��7�S�)����A�C�5�3�'����A�C�q�6�C�(����A�Q�4�#�&����A�q�6�C�(rc�<�|jdt��d�|jdt��d�d}|jdt�d|��d�|jdt��d�|jdt�d|��d�|jdt��y)	N�g:zg:global variablezg:'global variable'�local variable� l:z"g:global variable l:local variablez$g:global variable l:'local variable'zmodule 'unittest' from)r*�a_global�assertIn�unittest)r�a_locals  r�test_globalzTestCase.test_globals������2�h�Z��*=�>����2�h�\�*�,A�B�"�������
�#�g�Y�'�)M�	
�	
���2�h�\�*�,A�B������
�#�g�[�)�+Q�	
�	
�
�
�.�8�*�>rc���d}|jd|��d�|jd|��d�d}|jd|�d|��d�|jd|��d�|jd|�d|��d�y)	Nzreally a localr�zg:really a localzg:'really a local'r�r�z!g:really a local l:local variablez#g:really a local l:'local variable'r�)rr�r�s   r�test_shadowed_globalzTestCase.test_shadowed_globals���#�����2�h�Z��*<�=����2�h�\�*�,@�A�"�������
�#�g�Y�'�)L�	
�	
���2�h�\�*�,@�A������
�#�g�[�)�+P�	
rc�<�d�}|j|d��d�y)Nc��dt|�zSrur
rVs rrwzTestCase.test_call.<locals>.foo,s���#�a�&�=� rr}zx=10r�)rrws  r�	test_callzTestCase.test_call+s��	!�	
���C��G�9�v�.rc�d�d}|jd�dz�d�|j|�dz�d�y)NrorrI�000�555r�)rr.s  r�test_nested_fstringszTestCase.test_nested_fstrings1s7��
�����q�c�1�H�:��.����q�c�1�H�:��.rc��gd�}|D�cgc]}|jdd���}}|jtd||z�ycc}w)N)zfu''zuf''zFu''zfU''zUf''zuF''zufr''zurf''zfur''zfru''zrfu''zruf''zFUR''zFur''zfb''zfB''zFb''zFB''zbf''zbF''zBf''zBF''r��"r�)�replacerr�)r�single_quote_casesr?�double_quote_casess    r�test_invalid_string_prefixesz%TestCase.test_invalid_string_prefixes6sS��
��0BT�T�AS��d�l�l�3��4�AS��T�����)�+=�@R�+R�	
��Us�?c	�X�|jd�d�|jd�d�|jd�d�|jd�d�|jddD��cic]\}}||��
c}}��d�|jddD��cic]\}}||��
c}}��d�ycc}}wcc}}w)NrIr zexpr=))rHrGzexpr={1: 2}r�rjs   r�test_leading_trailing_spacesz%TestCase.test_leading_trailing_spacesTs������Q�4�#�&����a�5�3�'����A�4�#�&����A�5�3�'����5�J�"?�J�D�A�q�1�a�4�J�"?� @�A�=�Q����5�J�"?�J�D�A�q�1�a�4�J�"?� A�B�M�R��#@��"?s�
B �
B&c��|jddk7�d�|jddk7��d�|jddk7�d�|jddk7d�d�y)NrIr9�Truez.3�Trur�r6s r�test_not_equalzTestCase.test_not_equal]s`��
	
���A�q�D�6�F�+����A�q�D��7�V�,����A�q�D�8�f�-����A�q�D�2�;��/rc�0�|jddk(�d�y)NrrH�Falser�r6s r�test_equal_equalzTestCase.test_equal_equalgs��	
���A�q�D�6�G�,rc�,�|jdd�d�|jdd�d�|jdd�d�|jdd�d�|jd�d�|jd�d�|jd�d�|jd�d�|jdd�d�|jd	�d	�|jdd
�d�|jtdgd
��|jtdgd��dD]#}|jtd|zd|zdzg��%dD] }|jtdd|zdzg��"dD] }|jtdd|zdzg��"|jtdgd��y)Ng��Q�	@z10.10z
      3.14z
3.14      r�z'a'rIr za!rz!<10.10z
3.14!!!!!!�f-string: expecting '}')�f'{3!'�f'{3!s'zf'{3!g'z&f-string: missing conversion character)zf'{3!}'zf'{3!:'zf'{3!:}')r��A�G�äuɐzDf-string: invalid conversion character %r: expected 's', 'r', or 'a'zf'{3!z}')r �!r�)z sz s zFf-string: conversion type must come right after the exclamanation markzFf-string: invalid conversion character 'ss': expected 's', 'r', or 'a')z	f'{3!ss}'z
f'{3!ss:}'zf'{3!ss:s}'r�)r�conv_identifier�conv_non_identifier�convs    r�test_conversionszTestCase.test_conversionsms������D��<�,�7����D�5�>�L�9����D�5�>�L�9����D�5�>�L�9����C�5�3�'����C�7�U�+����C�7�U�+�	
���A�7�S�)����D�U�+�l�;�	
���E�7�U�+�	
���D��>�L�9�����%�
�	
�	
����4�
�	
� 9�O�����,�.=�>��?�*�T�1�2�	
� 9�$,������8��.�.��5�6�
�$,� �D�����&��4��$�&�'�	
� �	
����W�
�	
rc�6�|jtdgd��y)Nr�)zf'' = 3z
f'{0}' = xz
f'{x}' = xr�r6s r�test_assignmentzTestCase.test_assignment�s�������
�	
rc�6�|jtdddg�y)Nr�zdel f''z
del '' f''r�r6s r�test_delzTestCase.test_del�s!���������
�	
rc�@�|jtdgd��|jtdgd��|jtddg�|jd�d�|jd�d�|jd	d�d
��d�|jdd�d
��d
�y)Nz#f-string: single '}' is not allowed)zf'{{}'zf'{{}}}'zf'}'zf'x}'zf'x}x'z
f'\u007b}'zf'{3:}>10}'zf'{3:}}>10}'r�)zf'{3'r�zf'{3:'r�zf'{3!s:'z	f'{3!s:3'zf'x{'zf'x{x'zf'{x'zf'{3:s'zf'{{{'zf'{{}}{'zf'{'zf'{i='r�zf'{3:{{>10}'r�r�rIz>10z
}}}}}}}}}3rGz
{{{{{{{{{2)rr�r*r6s r�test_mismatched_braceszTestCase.test_mismatched_braces�s�������1�

�	
� 	
����%�
�	
�*	
����>��
�	
�	
���C�5�3�'����C�5�3�'����A�s�e�3�Y�<�,�7����A�s�e�3�Y�<�,�7rc����fd�}�fd�}�fd�}|dd�|dd�|dd�|dd�|dd�|dd�y)Nc�>��d}|�rd}nd}�j||�y�NrrHrGr��r-�expected�flagrs   �r�test_fstringz2TestCase.test_if_conditional.<locals>.test_fstrings)����D���v��������T�8�,rc�>��d}|�rd}nd}�j||�yr�r�r�s   �r�test_concat_emptyz7TestCase.test_if_conditional.<locals>.test_concat_empty
s)����D��C�y��������T�8�,rc�B��d}d|��rd}nd}�j||�y)Nrr�rHrGr�r�s   �r�test_concat_non_emptyz;TestCase.test_if_conditional.<locals>.test_concat_non_emptys+����D��a�S�z��������T�8�,rr'rGr�rHr)rr�r�r�s`   r�test_if_conditionalzTestCase.test_if_conditionalsP���
	-�	-�	-�	�R����S�!���"�a� ��#�q�!��b�!�$��c�1�%rc��d}|j|�d�|j|��d�|j|��d�|j|��d�y)N�testz'test'r�r�s  r�test_empty_format_specifierz$TestCase.test_empty_format_specifier&sU�������A�3��(����A�Q�4�&�)����A�q�6�F�+����A�q�6�H�-rc��ddd�}d}|j|d�d�|j|d�d�|j||�d�|jdj|��d�|jdj|��d�y)	NrX�integer)r�rrr�z{d[a]})r�z{d[0]})r*r+)rr�r�s   r�test_str_format_differencesz$TestCase.test_str_format_differences-s�����
��
�����A�a�D�6�I�.����A�c�F�8�h�/����A�a�D�6�I�.�������1��-�x�8�������1��-�y�9rc�h�|jtdddg�|jtdddg�y)N�unsupportedzf'{(lambda: 0):x}'zf'{(0,):x}'zUnknown format codezf'{1000:j}')rr�r�r6s r�test_errorszTestCase.test_errors9sB�������%��
�	
�	
����!���
�	
rc�P�t�5}tjj|d�}t	|dd��5}|jd�ddd�t
|d��\}}}ddd�|jjdd��y#1swY�ExYw#1swY�8xYw)	Nzt.pyrG�utf-8)�encodingzf"{a b}"�ascii)�PYTHONIOENCODING�backslashreplace)	r�os�path�join�open�writerr��encode)r�cwd�	file_pathr�rx�stderrs      r�test_filename_in_syntaxerrorz%TestCase.test_filename_in_syntaxerrorLs���
�Z�3������S�&�1�I��i��w�7�1����
�#�8�0��W�U�L�A�q�&�	�
	
�
�
�i�&�&�w�0B�C�V�L�8�7���Z�s"�/B�B�B�B	�B�B%c�f�td�D]#}|jd|��dt|�z��%y)Ni�zi:)r�r*r)rr�s  r�	test_loopzTestCase.test_loopUs.���t��A����r�!��X�t�c�!�f�}�5�rc��dddd�}|j|d�d�|j|d�d�|j|d�d�|j|d�d�y)N�dquote�squoterx)r�r�rwr�r�rwr�r�s  r�	test_dictzTestCase.test_dictYsl�����
��
	
���a��f�X�(�3����a��f�X�(�3����A�e�H�:��.����A�e�H�:��.rc�p�|jtd�d�|jtd�d�y)Nzf"\
"r'zf"\
")r*rr6s r�test_backslash_charzTestCase.test_backslash_chares,��	
����i��"�-�����i��"�-rc	�V
��d�|jd���dt��z�|jd���dt��z�|jd���dt��z�|jd���dt��z�|jd���dt��z�d�|jd�d��dt	�d�z�|jd����dt	�d�z�|jd�d��dt	t��d�z�|jd�d��dt	t��d�z�|jd�d��dt	t��d�z�d�|jd	d
�zdz��d�d
}|jd|d��d�|jdd��d�|jddd��d�d�d}|jd|�d�d�|jdd
��d�|jddk(�d �|jddk7�d!�|jddk�d!�|jddk\�d �|jd"x��d"�|j�d"�|jd#x��d"�|j�d#�|jd$�d$�d%�|j�d&�d'��fd(�}d�|j|d)�*��d+�|j�d)�|j|d,�*��d)�|j�d,�d%}|jd-d.|���d/�|jt
j
j
�d0|�d1|�d2|���d3�Gd4�d5�}|jd6|���d7�|jd6|���d7�|jd6|����d8�|jd6|�d9��d:�|jd6|�d;��d<�|jd6|�d��d=�|j|�d>d%���d?�|jttd@�dA�|jdB��dC�dBt��zdCz�|jdD��dC�dDt��zdCz�|jdE��dC�dEt��zdCz�|jdF��dC�dFt��zdCz�|jdGd-d-dH�dI���dJ�|jdKd
��dL�y)MNzA stringrvzx =g����	�@z.2fr'z^20�	z3*x+15=rIr�z	3*x+15=42gffffff?@utenπ=utenπ=31.40u"Σ"=uΣu	"Σ"='Σ'z3.1415=go���!	@z.1fz*^20z*****3.1415=3.1*****uπualpha α pi=u	 ω omegaualpha α pi='π' ω omegaz
3
=z
3
=3rrHr�r��5ro�=��=10�
        20c����}|�|Sr�r)r��oldxr-s  �rr�z)TestCase.test_debug_conversion.<locals>.f�s����D��A��Krz3=)r�r�r9rGzy=�yyyyyyyyyyyyyyyyyyy2zh1y=zh2y=zh3y=zh1y=20h2y=20h3y=20c��eZdZd�Zd�Zy)�)TestCase.test_debug_conversion.<locals>.Cc��d|��S)NzFORMAT-r)rr�s  rrz4TestCase.test_debug_conversion.<locals>.C.__format__�s�� ���}�$rc��y)N�REPRrr6s r�__repr__z2TestCase.test_debug_conversion.<locals>.C.__repr__�s��rN)r r!r"rr�rrr�Cr��s��
%�
rr�zC()=zC()=REPRzC()=FORMAT-r�zC()=FORMAT- r-zC()=FORMAT-xzC()=********REPR********z20=zFORMAT-20=20zf'{C=]'rwzXx=rdzXx  =zXx=  zXx  =  zsadsd 1 + 1 =  �1dr�zsadsd 1 + 1 =  2.000000z	1+2 = 
  z
1+2 = 
  3)
r*�reprrr�r+�datetime�nowr�r�r)r�tenπ�pir�r.r�r-s      @r�test_debug_conversionzTestCase.test_debug_conversionksg��������B�A�4��$��a��.�1����C�A�5��5�4��7�?�3����B�A�6��D�3�q�6�M�2����B�A�6��D�4��7�N�3����B�A�6��D�5��8�O�4������B�A�s�8��d�V�A�u�-=�&=�>����B�A�a�5��4�&��B�-�#7�8����B�A��:���v�d�1�g�u�/E�(E�F����B�A��:���v�c�!�f�e�/D�(D�E����B�A��:���v�e�A�h��/F�(F�G�
�����G�A�a�C��F�9��{�3������F�E�3�<��-�8�	
���E�D�7��]�3�	
���w�v�s�m�,�T�2�5K�L������=�R�E��3�5P�Q�	
������
�
�		
�	
���A�q�D�6�G�,����A�q�D�6�F�+����A�q�D�6�F�+����A�q�D�6�G�,�����V�Q�:��,�����C� �����T�Q�8�c�*�����A�����C�5�3�'���	
���A�c�7�\�2�	�
�����A��I�;��-�����D�!����A��F�8�d�+�����A��
�����A�r�q�d�U�8�&<�=����� � �$�$�&�u�!��U��t�5�a�T�&9�:�=Q�	
�
	�	�	
���D�A�C�6��J�/����D�A�C�8��j�1����D�A�C��7��]�3����D�A�C��8��n�5����D�A�C��8��n�5����D�A�C�4�=�)�+E�F����A�C����v�;��8����+�t�Y�7�
�����4�Q�D���E�D��G�O�c�$9�:�	
���6�Q�F�!��g��Q��&7�#�&=�>����6�Q�F�!��g��Q��&7�#�&=�>����8�Q�H�A��	�D��G�(;�c�(A�B����+�%�U�2�J�a�<�!8�9�;T�U�����s��
��	
rc�~�d}|j|d�d�|jdx}�d�|j|d�y)Nr�r�r�r}r1r�r�s  r�test_walruszTestCase.test_walrus�sE����	
���A�c�7�\�2�	
����U�Q�9�t�,�����B�rc�t�|jtd�5tddd�ddd�y#1swYyxYw)N�/f-string: expecting '=', or '!', or ':', or '}'z
f'{a $ b}'�?r<�r
r�r?r6s r�!test_invalid_syntax_error_messagez*TestCase.test_invalid_syntax_error_message�s4��
�
#�
#��J�
�
�L�#�v�.�
�
�
�s�.�7c��tjd�}|jt|�5dd�ddd�y#1swYyxYw)NzCannot specify ',' with ','.rHz,,��re�escaper
r��r�	error_msgs  r�(test_with_two_commas_in_format_specifierz1TestCase.test_with_two_commas_in_format_specifier��4���I�I�<�=�	�
�
#�
#�J�	�
:���f�;�
:�
:��	�:�Ac��tjd�}|jt|�5dd�ddd�y#1swYyxYw)NzCannot specify '_' with '_'.rH�__rrs  r�,test_with_two_underscore_in_format_specifierz5TestCase.test_with_two_underscore_in_format_specifier�rrc��tjd�}|jt|�5dd�ddd�y#1swYyxYw)N� Cannot specify both ',' and '_'.rHz,_rrs  r�8test_with_a_commas_and_an_underscore_in_format_specifierzATestCase.test_with_a_commas_and_an_underscore_in_format_specifier�4���I�I�@�A�	�
�
#�
#�J�	�
:���f�;�
:�
:�rc��tjd�}|jt|�5dd�ddd�y#1swYyxYw)NrrHz_,rrs  r�7test_with_an_underscore_and_a_comma_in_format_specifierz@TestCase.test_with_an_underscore_and_a_comma_in_format_specifierrrc���|jtd�5tddd�ddd�|jtd�5tddd�ddd�y#1swY�6xYw#1swYyxYw)Nz!can't use starred expression herezf'{*a}'rr<r�zf'{**a}'rr6s r�)test_syntax_error_for_starred_expressionsz2TestCase.test_syntax_error_for_starred_expressionssh��
�
#�
#�K�1T�
U��I�s�F�+�V��
#�
#��K�
�
�J��V�,�
�
�V�
U��
�
�s�A�A&�A#�&A/c�$�|jtdddg�|jtdddg�d}	t|dd	�y#t$rB}|j|jd
�|j|j
d�Yd}~yd}~wwxYw)Nzunterminated f-string literalzf"r�z+unterminated triple-quoted f-string literalzf"""zf'''zNx = 1 + 1
y = 2 + 2
z = f"""
sdfjnsdfjsdf
sdfsdfs{1+
2} dfigdf {3+
4}sdufsd""
rr<zz = f"""rI)rr�r?r*�textrO)r�data�es   r�test_not_closing_quotesz TestCase.test_not_closing_quotess������K�)H�4�QU�,�W�����F��QW�HX�	
���	*��D�#�v�&���	*����Q�V�V�Z�0����Q�X�X�q�)�)��	*�s�
A�	B�
8B
�
Bc�h�|jtdgd��|jtdddg�y)Nr�)z	f'{1=}{;'z
f'{1=}{+;'zf'{1=}{2}{;'zf'{1=}{3}{;'rz
f'{1=}{1;'zf'{1=}{1;}'r�r6s r�test_syntax_error_after_debugz&TestCase.test_syntax_error_after_debug)s<������>�
�		
�	
����=���
�	
rc�f�t�5d}tdd�5}|jd�ddd�t|�\}}}ddd�|j	jd�j
�jdd�jdd�d�y#1swY�pxYw#1swY�exYw)	N�	script.pyrGzprint(f'''{
3
=}''')r�z
r��
z3
=3)rr�r�rr*�decode�stripr�)r�scriptr�rx�stdouts     r�test_debug_in_filezTestCase.test_debug_in_file=s���
�Z� �F��k�3�'�1������(�,�F�3�L�A�v�q��	
����M�M�'�"�(�(�*�2�2�6�4�@�H�H��t�T��	
�(�'���Z�s!�B'�B�B'�B$	� B'�'B0c�Z�t�5d}t|d�5}|jd�ddd�t|�\}}}|j	d|�|jt
|j�j��d�ddd�y#1swY�jxYw#1swYyxYw)Nr#rGzprint(f'\{1}')s\1rG)	rr�r�rr�r*rLr&�
splitlines)rr'r�rxr(r�s      r�.test_syntax_warning_infinite_recursion_in_filez7TestCase.test_syntax_warning_infinite_recursion_in_fileLs���
�Z� �F��f�c�"�a����)�*�#�!1�� 8��A�v�v��M�M�&�&�)����S�����!:�!:�!<�=�q�A��Z�"�"���Z�s"�B!�B�A B!�B	�B!�!B*N)[r r!r"rr/rEr_rirmrrrzrr�r�r�r�r�r�r�r�r��skipIfr�is_wasir�r�r�r�r�r�r�r�rrrrrrrr!r%r'r*r3r5r7rCrHrJrLrQr[r]rkrrryr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrrrrr!r)r,rrrrr s
���=�6"�44�>26�h+.�Z@5�D2�,MM�^e5�N5�$	%�%�'�
�$�


��X�_�_�W�_�_�&F�G�$G�H�$G�L�X�_�_�W�_�_�&F�G�
�H�
�"
�%
�N'
�RL
�\0�20
�dA�
,�H
�T
�&
�84�t
�,
�*
�(W�
�'�@'�
9�/�&@�,�Q�	(�7�
I�
3�,�4�0��)�
?�
�/�/�

�<S�0�-�H
�T	
�
�28�h$&�L.�
:�
�&M�6�
/�.�q
�x �/��
�
�
�
-�*�*
�(

�Brr�__main__)r=r�r�r	r(r�r�rEr�r�test.support.os_helperr�test.support.script_helperrrr�rr �mainrrr�<module>r3s^����	�	������+�N���tB�x� � �tB�n9�z���H�M�M�O�r

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