403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.141
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_ast/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_ast/__pycache__/test_ast.cpython-315.pyc
R
>lqj�Rc��]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s
]PH,s]PH0s]PH4s
]PH8s]PH<s]PH@s]PHDs]QHHGs]QHPGs]QH4Gs]PH^s]QHdGs]QHlGs]QHlGsGsGsG s ]QH�G"s"]QH�G$s$]Q	H�G&s&]Q
H�G(s(G)s)G*s*G+s+G,s,G-s-\	O\O_\O`2s1\	Od\12Tt,tFDpOgQ2%fJUMJ	tos4\4OkQQ
,2\\02OlQ*Q*s7QQks8QQks9QQ\Ot2s;QQ\Ot2s<QQ\Ot2s=QQ\Ot2s>QQ\Ot2s?QQ\Ot2s@Q Q!\Ot2sAQ"Q#\"\Ot2sBQ$Q%\Ot2sC\O�Q&Q'\Ot22sE\O�Q(Q)\Ot22sGQ*Q+\Ot2sH\IQ,6Xc\\J\O�2]6�c2\O�]*Q-6Xc\92\O�]2\O�2P!P!\cPsCKdh9httoh).�)�StringIO)�Path)�dedent)�support)�	os_helper)�skip_emscripten_stack_overflow�skip_wasi_stack_overflow�skip_if_unlimited_stack_size�skip_if_huge_c_stack)�ASTTestMixin��ensure_lazy_imports)�to_tuple)�
eval_tests�eval_results�
exec_tests�exec_results�single_tests�single_resultsz.pyztest/test_grammar.pyztest/test_unpack_ex.py�datazast_repr.txtc�<�U]6�cPgQ[[*-!���return)�list�str)�formats"�+C:\Python315\\Lib\test\test_ast\test_ast.py�__annotate__�$ast_repr_get_test_cases.__annotate__.s��#�#��c��#�c�&�[[*!�N)rr�r r�ast_repr_get_test_casesr$.s
���
�"�"r c��U]6�cPgQP-!rr#)rs"rr�&ast_repr_update_snapshots.__annotate__2s��3�3�4�3r c	���[2Tt,tFD"o[[OU22MJ$	oo[OQO
U22P!ttoh)�
)r$�repr�ast�parse�AST_REPR_DATA_FILE�
write_text�join)�testrs  r�ast_repr_update_snapshotsr02sD��.E�.G�H�.G�d�D����4��!�.G�D�H��!�!�$�)�)�D�/�2��Is�*Ac�F`�\sQs]7sn\O
Q2sQsUsP!)�LazyImportTestc�$�[Q.Ql2P!)r*>�re�enum�inspect�argparse�
contextlib�collectionsr��selfs&r�test_lazy_import�LazyImportTest.test_lazy_import8s
���E�#e�fr r#)	�__name__�
__module__�__qualname__�__firstlineno__r�cpython_onlyr<�__static_attributes__�__classdictcell__��
__classdict__s@rr2r27s�������g��gr r2c�`�\sQs]=snPsQsQsQsQsQs	Qs
QsQsQ	s
Q
sQsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Qs"Qs#Q s$Q!s%\&ONQ"2s(Q#s)Q$s*Q%s+Q&s,Q's-Q(s.Q)s/Q*s0Q+s1Q,s2Q-s3Q.s4Q/s5Q0s6Q1s7Q2s8Q3s9Q4s:Q5s;Q6s<Q7s=Q8s>Q9s?Q:s@\&ON\&O�\BO�Q;6XcQ<LQ=2\D2\E2Q>2222sFQ?sGU1Q@kQAksHU1QBkQCksIU1QDkQEksJQFsKQGsLQHsMQIsNUsOP!)J�	AST_Testsc��[U[2%fP
!QUO7cP
!UQ6g9%cU]*O2!)Fr*�AST)�
isinstance�typer?�isupper)r;�name�nodes&&&r�_is_ast_node�AST_Tests._is_ast_node@s>���$��%�%������'���u�}�2�2��a����!2�2r c���[U[O2%cUOeP![U[O[O
[O12%cBUOUO1oUOV22UOUO1oUOFD�o[V2o[U[2%cUSoU%c.UQ6Xc'U]*OU]*O1oSFDoUOVv2J	JxUeJ~UOVR2J�	UOUOUO2P!)N�decorator_list)rKr*rJ�_fields�expr�stmt�
excepthandler�lineno�
col_offset�assertGreaterEqual�getattrr�_assertTrueorder�assertEqual�__match_args__)r;�ast_node�
parent_pos�node_posrN�value�	first_pos�childs&&&     rr\�AST_Tests._assertTrueorderGs���(�C�G�G�,�,��0@�0@�0H���h����3�8�8�S�5F�5F� G�H�H� ����)<�)<�=�H��#�#�H�9�"�/�/�8�+>�+>�?�J��$�$�D��H�+�E��%��&�&�&�	��T�%5�5�!&�q����%��(�2E�2E� F�I�"�E��)�)�%�;�#��"��%�%�e�8�%�	
����)�)�8�+B�+B�Cr c	��UO[29^tt^2[O2oPPP2UO	WO
Q2]*UmUO	UO]*2UO	UOQ*]*2UO[29^tt^2UOPPP2UO[29^tt^2UO[29^tt^2[O]2PPP2PPP2P!)%fhCK	9h)%fhK�9h)%fhKA9h)%fhP!9h)N�foobarr#)�assertWarns�DeprecationWarningr*rJr]rTrg�__dict__�assertRaises�AttributeError�vararg�	TypeError�r;�xs& r�test_AST_objects�AST_Tests.test_AST_objectsZs���
�
�
�0�
1�
1����	�A�2�������B�'����������2�&�������H�-�r�2�
�
�
�~�
.�
.�
�H�H�/��
�
�y�
)�
)�4�+;�+;�<N�+O�+O��G�G�A�J�,P�
)�
)�2�
1�
1��/�
.��,P�+O��
)�
)�
)�sS�D5�<
E	�.E/�E	�#E/�5E	�>E	�	E	�E	�E,
�%E,
�'E/�/F	�8F	c	�`�[OOnU1QkoUOU2[O;QoUO	[
U29^tt^2UO
[29^tt^2[O]{Q5PPP2PPP2UO	[
U29^tt^2UO
[29^tt^2[O2PPP2PPP2P!)%fhK|9h)%fhK�9h)%fhK@9h)%fhP!9h)c�4:�R[OmP!r")r*rJrT)�	old_values�r�cleanup�5AST_Tests.test_AST_fields_NULL_check.<locals>.cleanupns���'�C�G�G�Or z0type object 'ast.AST' has no attribute '_fields')�arg1)r*rJrT�
addCleanup�assertRaisesRegexrlrhri)r;rv�msgrus&  @r�test_AST_fields_NULL_check�$AST_Tests.test_AST_fields_NULL_checkjs�����G�G�O�O�	�	(����� ��G�G�O�@��
�"�"�>�3�7�7����/�0�0��G�G���
1�
8�

�"�"�>�3�7�7����/�0�0��G�G�I�
1�
8�7�	
1�0��
8�7��
1�0��
8�7�7�s`�$D!�D	�D!�E�&D4	�<E�D
�D
�D!�!D1	�*D1	�4E
�=E
�?E�E	�E	c��QQ2o[O2oU2UmV"Om[O
UO2o=[O2UOU22P!)c��\sQs]�sQsP!)�1AST_Tests.test_node_garbage_collection.<locals>.Xr#�r>r?r@rArCr#r r�Xr�����r r�)	r*�Modulerp�a�weakref�refr�
gc_collect�assertIsNone)r;r�r�r�s&   r�test_node_garbage_collection�&AST_Tests.test_node_garbage_collection�sZ��	�	��J�J�L���c��������k�k�!�#�#���
��������#�%� r c�"�[[Q1[[Q1[[
Q11FD�vqo[
V2FD�vqEUOQUQ59^tt^2[UQU[OP
Q5oUO[U2U2UOUQ	2PPP2UOQVCQ59^tt^2[WQU2PPP2J�	J�	P!)%fhKK9h)%fhJ�9h)
�exec�single�eval�parsing)�action�input�?��optimize�	compiling)r�r��kind)rr)rrrrrr�zip�subTest�compiler*�
PyCF_ONLY_ASTr]rr\)r;r��outputr��i�o�ast_trees&      r�
test_snippets�AST_Tests.test_snippets�s���%/��v�$F�%1�>�8�$L�%/��v�$F�$H��E�4��E�*����\�\��!�\�<�<�&�q�#�t�S�5F�5F�QV�W�H��$�$�X�h�%7��;��)�)�(�F�;�=��\�\��A�\�I�I��H�c�4�0�J�I�+�$H�=�<��J�I�I�s%�AC*
�
C=
�*C:�3C:�=D�Dc��[[*[*oSFD(o[OUP
Q5o[UQQ2J*	P!)Fr��<string>r�)rrrr*r+r�)r;�snippets_to_validate�snippet�trees&   r�test_ast_validation�AST_Tests.test_ast_validation�s8��)�L�8�:�E��+�G��9�9�W�u�5�D��D�*�f�-�,r c	��QFD>oUO[[O[O]*2UQ5J@	P!)�r�)���rr�r)rkrnr*r+�Constant)r;�optvals& r�test_parse_invalid_ast� AST_Tests.test_parse_invalid_ast�s5��#�F����i����C�L�L��4D�'-�
�
/�$r c
��,QNoSFCD�vq#UOV#Q59^tt^2[OQUQ5o[O[OQ2UQ5oVE1FCD1oUOUO]*[O
2[
U[2%cuUOUO]*O[O2UOUO]*OOU2J�UOUO]*O[O2UOUO]*OOU2CJ4	PPP2CJ�	P!)%fhCJ�9h)r��	__debug__)r��expectedr�))r�r�)rr�)r�F)rF)
r�r*r+�assertIsInstance�body�ExprrK�boolrbr�r]�Name�id)r;�casesr�r��res1�res2�ress&      r�!test_optimization_levels__debug__�+AST_Tests.test_optimization_levels__debug__�s"��M��"'��V����V��?�?��y�y��v�>���y�y����;�!7�&�I�� �<�C��)�)�#�(�(�1�+�s�x�x�@�!�(�D�1�1��-�-�c�h�h�q�k�.?�.?����N��(�(����!��):�):�)@�)@�(�K��-�-�c�h�h�q�k�.?�.?����J��(�(����!��):�):�)=�)=�x�H�(�@�?�#(�?�?�?�s�BF7	�=C+F7	�7G	
�G	
c�j�,QNoSFD�vq#UOQUQU029^tt^2Qo[OU2oV%O]*mV5O]*mUO
[29^tt^2[UQQ2PPP2PPP2J�	,QNoSFD�vqxUOQUQU029^tt^2Qo[OU2oVuO]*m	V�O]*m
UO
[29^tt^2[UQQ2PPP2PPP2J�	P!)%fhK�9h)%fhCJ�9h)%fhKF9h)%fhJ�9h)�
zCheck invalid linenos �:za = 1r�r�zCheck invalid col_offset ))r�r�)i�������)r�r�)������)r�r�)r�r*r+r�rX�
end_linenork�
ValueErrorr�rY�end_col_offset)	r;�invalid_linenosrXr�r�r��invalid_col_offsetsrYr�s	&        r�!test_invalid_position_information�+AST_Tests.test_invalid_position_information�sJ��
��#2��F���� 6�v�h�a�
�|�L�M�M�!���y�y��)��&,�	�	�!��#�*4�	�	�!��'��&�&�z�2�2��D�*�f�5�3�N�M�#2�
��+>�&�J���� 9�*��Q�~�FV�W�X�X�!���y�y��)��*4�	�	�!��'�.<�	�	�!��+��&�&�z�2�2��D�*�f�5�3�Y�X�+>�
3�2��N�M�M��"3�2��Y�X�X�sa�A$E9	�E&
�E9	�A$F!	�F
�F!	�&E6�/E6�1E9	�9F
�F
�F�F�F!	�!F2
�*F2
c��[O[O[OQ]]Q5,]]Q5[O[OQ]]Q5,]]Q5,,Q5o[	UQQ2P!)�builtins�rNrXrY)�namesrXrY�	traceback�r��type_ignoresr�r�)r*r��Import�aliasr��r;r�s& r�>test_compilation_of_ast_nodes_with_default_end_position_values�HAST_Tests.test_compilation_of_ast_nodes_with_default_end_position_values�sl���z�z��J�J�c�i�i�Z��a�P�Q�Z[�hi�j��J�J�c�i�i�[��q�Q�R�[\�ij�k� 
����	��j�&�)r c��[OQ]]Q5oQQQ]-Q]QQ-Q]QQQQ-QQQQQ]-1FD|oUOUQ59^tt^2[O[OQ
QU,-U@,,Q5o[UQ	Q
2[OU]Q5PPP2J~	P!)%fhJ�9h)r�r�rXrYr�r�)�attrsr�r�r�r�r�r�r#)r*r�r�r�r�r�r+)r;r�r�r�s&   r�#test_negative_locations_for_compile�-AST_Tests.test_negative_locations_for_compile�s����	�	�{�1��C��
�r�<��+�
�q�,��+�
�q�,��,<�b�A�
�r�<��\�1�=�	
�E����E��*�*��z�z��J�J�6�e�W�6��6�(� "�$��
��j�&�1��	�	�$��+�+�*�

�+�*�*�s�AB8	�8C	
�C	
c��[OQ2o[OQ2o[OQ2o[OQ2o[OQ2o[OQ2oUUUUUU1FCD�oQFCD�oUOVxQ59^tt^2[OVxQ5o	UO[
U	O]*O2]2U]6XciU	O]*O]*o
UOU
[O2UO[U
2Q]Q	]Q
]Q]-2L�UOU	O]*O]*[O2UOU	O]*O]*O[O2[UQQ
2[UQQ
UQ5[U	QQ
2[U	QQ
UQ5PPP2CJ�	CJ�	P!)%fhCJ�9h)z>
            class A:
                """Docstring"""
        zO
            class A:
                """
                Docstring"""
        zA
            def some():
                """Docstring"""
        zi
            def some():
                """Docstring
                                       """
        zG
            async def some():
                """Docstring"""
        ze
            async def some():
                """
                Docstring
            """
        ��code�	opt_levelr�rXrYr�r�r�r��rr�r)�textwraprr�r*r+r]�lenr�r��Pass�varsr�rbr�r�)r;�class_example1�class_example2�def_example1�def_example2�async_def_example1�async_def_example2r�r��mod�	pass_stmts&          r�'test_docstring_optimization_single_node�1AST_Tests.test_docstring_optimization_single_node�s���!���*�
��"���*�
��
 ���(�
�� ���(�
��
&�_�_�.�
��&�_�_�.�
��
������

�D�'�	��\�\�t�\�A�A��)�)�D�=�C��$�$�S����!��)9�)9�%:�A�>� �A�~�$'�H�H�Q�K�$4�$4�Q�$7�	��-�-�i����B��(�(� ��O� (�!� ,�a� ,�a� 0�!�	���-�-�c�h�h�q�k�.>�.>�q�.A�3�8�8�L��-�-��H�H�Q�K�,�,�Q�/�5�5��L�L��
�D�#�v�.��D�#�v�	�B��C��f�-��C��f�y�A�3B�A�'�
�B�A�A�s�4AI
�	D.I
�I�Ic
��[OQ2o[OQ2o[OQ2oUUU1FCDjoQFCD^oUOVEQ59^tt^2[OVEQ5oU]6XcTUOUO]*O]*[O[O12L�UOUO]*O]*[O2UOUO]*O]*O[O2[UQQ2[UQQUQ5[UQQ2[UQQUQ5PPP2CJa	CJm	P!)%fhCJ|9h)zz
            class A:
                '''
                Docstring
                '''
                x = 1
            zz
            def some():
                '''
                Docstring

            '''
                x = 1
            zp
            async def some():

                '''Docstring

            '''
                x = 1
            r�r�r�r�r�)
r�rr�r*r+�assertNotIsInstancer�r�r�r�rbr�r�)r;�
class_example�def_example�async_def_exampler�r�r�s&      r�*test_docstring_optimization_multiple_nodes�4AST_Tests.test_docstring_optimization_multiple_nodes-sc�� ���
�
�
��o�o�
�	
��%�O�O�
�	
��
���
�D�
'�	��\�\�t�\�A�A��)�)�D�=�C� �A�~��0�0��H�H�Q�K�,�,�Q�/� �X�X�s�x�x�0��
�-�-�c�h�h�q�k�.>�.>�q�.A�3�8�8�L��-�-��H�H�Q�K�,�,�Q�/�5�5��L�L��
�D�#�v�.��D�#�v�	�B��C��f�-��C��f�y�A�#B�A�'�
�B�A�A�s�/F;
�DF;
�;G
�G
c� �[OQ2O]*OOoUOUO2UOUO2UOUO2P!)zx[::])	r*r+r�rb�slicer��upper�lower�step)r;�slcs& r�
test_slice�AST_Tests.test_slicehs]���i�i�� �%�%�a�(�.�.�4�4�����#�)�)�$����#�)�)�$����#�(�(�#r c��[OQ2O]*oUOUO2P!)zfrom . import y)r*r+r�r��module)r;�ims& r�test_from_import�AST_Tests.test_from_importns.��
�Y�Y�(�
)�
.�
.�q�
1�����"�)�)�$r c��[OQ2oUOUO]*[O2QO2UO]*m[UQQ2P!)zfrom __future__ import divisionz __future__ �<test>r�)r*r+r�r��
ImportFrom�stripr�r�)r;r�s& r�!test_non_interned_future_from_ast�+AST_Tests.test_non_interned_future_from_astrsR���i�i�9�:�����c�h�h�q�k�3�>�>�:�+�1�1�3���������X�v�&r c�^�[OQ2O]*oUO[	UO
2]2UO
]*oUOUOQ2UOUO2UOUO]2UOUO]2UOUO]2UOUO]2[OQ2O]*oUO
]*oUOUOQ2UOUO2UOUO]2UOUO]2UOUO]2UOUO]2[OQ2O]*oUO
]*oUOUOQ2UOUOQ2UOUO]2UOUO]2UOUO]2UOUO]2[OQ2O]*oUO
]*oUOUOQ2UOUOQ2UOUO]2UOUO]2UOUO]2UOUO]2P!)	zfrom bar import y�yzfrom bar import *�*zfrom bar import y as z�zzimport bar as foo�bar�foo)
r*r+r�r]r�r�rNr��asnamerXr�rYr�)r;rr�s&  r�
test_alias�AST_Tests.test_aliasxs���
�Y�Y�*�
+�
0�
0��
3������R�X�X���*�������������S�)����%�,�,�'�������q�)�����)�)�1�-�����)�)�2�.�����-�-�r�2�
�Y�Y�*�
+�
0�
0��
3��������������S�)����%�,�,�'�������q�)�����)�)�1�-�����)�)�2�.�����-�-�r�2�
�Y�Y�/�
0�
5�
5�a�
8��������������S�)�������s�+�������q�)�����)�)�1�-�����)�)�2�.�����-�-�r�2�
�Y�Y�*�
+�
0�
0��
3��������������U�+�������u�-�������q�)�����)�)�1�-�����)�)�1�-�����-�-�r�2r c�0�UO[O[O2UO[O[O
2UO[O[O2UO[O
[O2UO[O[O2UO[O[O2P!r")	�assertIsSubclassr*�ForrVr�rUrJ�
comprehension�Gtr:s&r�test_base_classes�AST_Tests.test_base_classes�s������c�g�g�s�x�x�0����c�h�h����1����c�h�h����0����c�h�h����0����c�/�/����9����c�f�f�c�g�g�.r c�T�[OO2FD�vqUQ6XcJUOV2%fJ'UO	U2o[U[O2%fJZUO[UO2[2J�	P!��Index)r*rj�itemsrP�_construct_ast_classrKrJ�assertIsrLrT�tuple�r;rN�itemrps&   r�test_field_attr_existence�#AST_Tests.test_field_attr_existence�sm���,�,�,�,�.�J�D��w���� � ��,�,��-�-�d�3���a����)�)��M�M�$�q�y�y�/�5�9�/r c��[OO2FD[vqUQ6XcJUOV2%fJ'UO	U2o]UmUO
UO
]2J]	P!r)r*rjrrPrrr]r s&   r�test_dynamic_attr�AST_Tests.test_dynamic_attr�sa���,�,�,�,�.�J�D��w���� � ��,�,��-�-�d�3������ � �����*�/r c��-oUOO2FD�vq4U[IcQV#$JU[Ic]*V#$J%U[IcQV#$J5[U[2%fJM[U[O2%fJo[OU2%c9[QUO22P2oQUQ0oUOVV2LSoUOU2V#$J�	UQ-U@!)�capybarascapybarac3�n�SF �D&o[OU2%cJ!Uw�	J(	P!3hr")�_ast�_is_abstract)�.0�subs& r�	<genexpr>�1AST_Tests._construct_ast_class.<locals>.<genexpr>�s&��4H���4H�S�,0�,=�,=�c�,B�&)�S�4H�s�5�5zabstract node class z has no concrete subclassesr#)�__annotations__rr�int�objectrKrL�
issubclassr*rJr*r+�next�__subclasses__�assertIsNotNoner)r;�cls�kwargsrN�typ�concreter{s&&     rr�AST_Tests._construct_ast_class�s������,�,�2�2�4�I�D��c�z�)������!������*����C��&�&�:�c�3�7�7�+C�+C��$�$�S�)�)�#�%D�C�4F�4F�4H�%D�EI� K�H�0���5P�Q�C��(�(��7�"�H�#�8�8��B���!5�"�}�V�}�r c�D�[O2oUOUOQ2UO[OOQ[
[O*Q[
[O*Q[OP*Q[
[O*Q[
[O*Q[OP*Q[
[O*-2UOUO,2UOUO2[O[]]2oUOUO]2UOUO]2P!)�posonlyargs�argsrm�
kwonlyargs�kw_defaults�kwarg�defaults)r=r>rmr?r@rArB)r*�	argumentsr]rTr0r�argrUr>r�rm�rangeros& r�test_arguments�AST_Tests.test_arguments�s���M�M�O��������%I�	J�������6�6��4����=��D����M��c�g�g��n��$�s�w�w�-��4����>��S�W�W�t�^���S�X�X��9
�	�	
�������$����!�(�(�#��M�M�5��A�;�'���������#�������1�%r c�z�[O]2oQUmUOUOQ2P!)r��)r*r�rTr]ros& r�test_field_attr_writable�"AST_Tests.test_field_attr_writable�s*���L�L��O����	�������C�(r c	���[O]*2oUOUOQ
2UOUO]*2UO[29^tt^2UOPPP2UO[29^tt^2UOPPP2[O]]Q5oUOUO]2[O]*]Q5oUOUO]2UOUOQ
2UOUO]*2UO[[O]P]2UO[[O]P]]Q5QoUO[[OU229^tt^2[O]]Q5PPP2UO[O]*2O]*2UO[OQ2OQ2UO[OQ2OQ2UO[OQ2OQ2UO[OQ2OQ2UOP	2OP	2UOP
2OP
2UOP2OP2UOQ	2OQ	2P!)%fhCK:9h)%fhCK9h)%fhCK�9h)�*)rXrb�rXz5ast.Constant got multiple values for argument 'value'�rbg@y@�42s42.)rbr�)r*r�r]rTrbrkrlrXrgrnrzr4�escaper)r;rpr{s&  r�test_classattrs�AST_Tests.test_classattrs�s����L�L����������$5�6�������"�%�
�
�
�~�
.�
.�
�H�H�/��
�
�~�
.�
.�
�H�H�/�
�L�L���+��������1�%��L�L��A�&��������1�%�������$5�6�������"�%����)�S�\�\�1�d�A�>����)�S�\�\�1�d�A�a��H�E��
�
#�
#�I�r�y�y��~�
>�
>��L�L��!�$�?�	
������b�)�/�/��4�������d�+�1�1�4�8�������e�,�2�2�E�:�������d�+�1�1�4�8�������e�,�2�2�E�:��
�
�c�l�l�4�(�.�.��5��
�
�c�l�l�5�)�/�/��7��
�
�c�l�l�4�(�.�.��5��
�
�c�l�l�3�'�-�-�s�3�;/�
.�
.��/�
.�
.��?�
>�
>�s6�-
N+�
N?�O�+N<	�4N<	�?O	�O	�O$	�O$	c��QQ[O2oQQ[O2oU]*2oUOUO]*2UOUOQ2UO[U2U2UO
[V122UO
[U[O22UO[V222UO[[O]*2U22U]*Q5oUOUO]*2UO[U2U2P!)c�4``�\sQsQsnU1QksQsUsU9s!)�-AST_Tests.test_constant_subclasses.<locals>.N�c�::�[RU_U-U@QUmP!��spam)�super�__init__r)r;r>r8�	__class__s&*,�rr\�6AST_Tests.test_constant_subclasses.<locals>.N.__init__s����� �$�1�&�1���r )r)r>r?r@rAr\rCrD�
__classcell__)r]rFs@@r�NrVs����
 �
 r r`c��\sQsQsQsP!)�.AST_Tests.test_constant_subclasses.<locals>.N2�r#r�r#r r�N2rbr�r rdrZrO)	r*r�r]rbrrL�
assertTruerK�assertFalse)r;r`rd�ns&   r�test_constant_subclasses�"AST_Tests.test_constant_subclassess���	 ����	 �	����	�
�b�E��������"�%�������f�%�����a��!�$����
�1�(�)����
�1�c�l�l�3�4�����A�*�+�����C�L�L��$4�a�8�9�
�B�K��������"�%�����a��!�$r c��[O]*2,o[OU,2oUOUOU2P!)rM)r*r�r�r]r�)r;r�rps&  r�test_module�AST_Tests.test_module$s7�����R� �!���J�J�t�R� ���������&r c
��QoUO[[OU2[O
2[O]2o[O]2o[O2o[O
V$U2oUOUOQ2UOUOU2UOUOU2UOUOU2]Um
UOUO]2UOUOQ2[O
]]]2oUOUO]2UOUO]2UOUO]2[O
]]]]Q5oUOUO]2UOUO]2UOUO]2UOUO]2UO[[O
]]]]2UO[[O
]]]]]Q5[O
]]]]Q5oUOUO]2UOUO]2UOUO]2UOUO]2QoUO[[OU229^tt^2[O
]]]]*Q5PPP2UO!["[O$2UO!["[O&2P!)%fhKZ9h)zUast.BinOp.__init__ missing 3 required positional arguments: 'left', 'op', and 'right'rN)�left�op�rightrXzAast.BinOp.__init__ got an unexpected keyword argument 'foobarbaz')�	foobarbaz�rnrorp)rzrnr4rQr*�BinOpr��Addr]rTrnrorprqrXrkrhrirV�expr_context)r;r{�n1�n3�addoprps&     r�test_nodeclasses�AST_Tests.test_nodeclasses)s���e�����y�"�)�)�C�.�#�)�)�D�
�\�\�!�_��
�\�\�!�_�����	���I�I�b��$��������$;�<��������$�������u�%�������"�%����������a�(�������$;�<��I�I�a��A����������#�������q�!�������!�$��I�I�a��A�a�(���������#�������q�!�������!�$�������1�%�	
���)�S�Y�Y��1�a��;����)�S�Y�Y��1�a��1��E�
�I�I�1��!�A�6���������#�������q�!�������!�$�������1�%�R��
�
#�
#�I�r�y�y��~�
>�
>��I�I�a��A��,�?�	
���+�S�X�X�6����+�S�-=�-=�>�?�
>�s�
N7�7O	�O	c�j�[O2oUOUOQ2P!)Nr#)r*�Subr]rTros& r�test_no_fields�AST_Tests.test_no_fields\s!���G�G�I��������B�'r c���[]]Q5oUO[29^tt^2[OQ-U@oPPP2[O
[OW1-U@,,2oUO[29^tt^2o[UQQ2PPP2UOQ[WO22P!)%fhK�9h)%fhKJ9h)r�rXrYrr�zbut got expr()r#)
�dictrhrir*rUr�r�rkrnr��assertInr�	exception)r;�pos�e�m�cms&    r�test_invalid_sum�AST_Tests.test_invalid_sumas����!��*��
�
�
�0�
1�
1�����3��A�2�
�J�J�����*�c�*�+�R�0��
�
�
�y�
)�
)�R��A�x��(�*��
�
�&��B�L�L�(9�:�
2�
1��*�
)�s#�C�C'�C$	�C$	�'C7	�0C7	c	��[O[O[O]*[O222,,2o[O
U2UO
[29^tt^2o[UQQ2PPP2UOQ[WO22P!)%fhK79h)rMrr�zidentifier must be of type str)r*r�r�r��Load�fix_missing_locationsrkrnr�r�rr�)r;r�r�s&  r�test_invalid_identifier�!AST_Tests.test_invalid_identifierks����J�J�������"�c�h�h�j�!9�:�;�R�@���!�!�!�$�
�
�
�y�
)�
)�R��A�x��(�*��
�
�6��B�L�L�8I�J�*�
)�s�	C�C	�C	c	�j�[]][1[]][121FDxo[O[OU2Q5o[O
U2UO
[Q29^tt^2[UQQ2PPP2Jz	P!)%fhJ�9h)r��r�zinvalid type in Constant: typerr�)	r1�	frozensetr*�
Expressionr�r�rzrnr�)r;�invalid_constantr�s&  r�test_invalid_constant�AST_Tests.test_invalid_constantrs��� #�a��C�[�)�Q��3�K�2H� H�����C�L�L�1A�$B�C�A��%�%�a�(��'�'��;�����8�V�,���!I����s�B!	�!B2
�*B2
c�p�[OQ2oPUO]*O]*OmUO	[
29^tt^2o[
UQQ2PPP2UOQ[WO22P!)%fhK79h)zdef f():
 yield from g()rr�zfield 'value' is required)
r*r+r�rbrkr�r�r�rr�)r;�empty_yield_fromr�s&  r�test_empty_yield_from�AST_Tests.test_empty_yield_from{s}���9�9�%@�A��7;����a� �%�%�a�(�.�.�4�
�
�
�z�
*�
*�b��$�h��7�+��
�
�1�3�r�|�|�3D�E�+�
*���(B%�%B5	�.B5	c���]PHoQo[OUQU29^tt^2UO[[
OQ2PPP2P!)%fhP!9h)rc��P!r"r#�r>s*r�
bad_normalize�0AST_Tests.test_issue31592.<locals>.bad_normalize�s��r �	normalizeuϕ)�unicodedatar�	swap_attrrkrnr*r+)r;r�r�s&  r�test_issue31592�AST_Tests.test_issue31592�sG��	�	�
�
�
�{�K��
G�
G����i����H�=�H�
G�
G�
G�s�&A�A*	�"A*	c�$�[OQ2oUO]*OoUOoUOoUOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2[OQ2oUO]*OoUOoUOoUOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2UOUO]2P!)z4+5+6+7z
4+5-\
 6-7)
r*r+r�rbrnr]rYr�rXr�)r;r��parent_binop�child_binop�grandchild_binops&    r� test_issue18374_binop_col_offset�*AST_Tests.test_issue18374_binop_col_offset�s���y�y��#���y�y��|�)�)��"�'�'��&�+�+������0�0�!�4�����4�4�a�8�����/�/��3�����3�3�Q�7����)�4�4�a�8����)�8�8�!�<��y�y��(���y�y��|�)�)��"�'�'��&�+�+������0�0�!�4�����,�,�a�0�����4�4�a�8�����0�0�!�4�����/�/��3�����+�+�Q�/�����3�3�Q�7�����/�/��3����)�4�4�a�8����)�0�0�!�4����)�8�8�!�<����)�4�4�a�8r c���[OQ2oUO]*O]*OoUOUO]2P!)z@a.b.c
def f(): pass)r*r+r�rSrbr]r�)r;r��attr_bs&  r�*test_issue39579_dotted_name_end_col_offset�4AST_Tests.test_issue39579_dotted_name_end_col_offset�sE���y�y�0�1�����1��,�,�Q�/�5�5������.�.��2r c��UO[OOQ2UO[OOQ2UO[O
OQ2UO[OOQ2[OO2Tt,tFDoQUO0MJ	ooQ[OO2]*O0U]$UO[OOOQ2U2P!ttoh)z0withitem(expr context_expr, expr? optional_vars)�GtEz%Name(identifier id, expr_context ctx)zBcmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotInz     | zexpr = r()r]r*�withitem�__doc__r�r��cmpoprUr5�assertCountEqual�split)r;rO�expressionss&  r�test_ast_asdl_signature�!AST_Tests.test_ast_asdl_signature�s���������-�-�/a�b���������%�0�������)�)�+R�S�������*�*�,p�q�<?�H�H�<S�<S�<U�V�<U�D������/�<U��V�"�3�8�8�#:�#:�#<�Q�#?�#G�#G�"H�I��A�����c�h�h�.�.�4�4�T�:�K�H��Ws�	Ec�x�UO[O[OQ2[OQ222UO	[O[OQ2[OP222UO	[O[OQ2[OQ222UO	[O[OQ2[OQ222P!)zx = 10rpz
x = 10;y = 20zclass C:pass)rer*�comparer+rfr:s&r�test_compare_basics�AST_Tests.test_compare_basics�s���������C�I�I�h�$7����8�9L�M�N�������S�Y�Y�x�%8�#�)�)�B�-�H�I�������S�Y�Y�x�%8�#�)�)�C�.�I�J�����K�K��	�	�/�2�C�I�I�n�4M�N�	
r c��[OQQQ5o[OQQQ5oUO[OV22UOQ*UmQUmUO
UOUO2UO[OV22UO[OV!22UOUmUO
UmUO[OV22UO[OV!22UOQ*UmQUm	UO
UOUO2UO[OVP	Q52UO[OV!P	Q52UOUmUOUm	UO[OVP	Q52UO[OV!P	Q52P!)z	m * x + br���mode�Spam�eggs��compare_attributesrY)r�)
r*r+rer�rTrZ�assertNotEqualrf�_attributesr��r;r��bs&  r�test_compare_modified_ast�#AST_Tests.test_compare_modified_ast�s{��
�I�I�k��/���I�I�k��/��������A�)�*��I�I�	�)��	�������A�I�I�q�y�y�1�������Q�*�+�������Q�*�+��I�I��	������������A�)�*�������A�)�*��
�
�	�1��
�������A�M�M�1�=�=�9�������Q�d�C�D�������Q�d�C�D��
�
��
������������A�T�B�C�������A�T�B�Cr c�*�Q]Q]QP	]P
[2[2QQQQQ	1o[UPP]2FD�vq#V*oUOV4Q59^tt^2UO	[
O[
OU2[
OU222UO[
O[
OU2[
OU222PPP2J�	.Q
l.Ql,oSFDloSFDboVg.*
FDQoUO[
O[
OU2[
OU222JS	Jd	Jn	P!)%fhCJ_9h)�g4@g�?�ABCD�abcdu	中文字g�)�literal�next_literali��g�>r�>r)	r�r�	enumerater�rer*r�r�rf)	r;�	constants�
next_index�constant�
next_constant�same_looking_literal_cases�same_looking_literalsr��same_looking_literals	&        r�test_compare_literals�AST_Tests.test_compare_literals�sU�����
���
���K��G������
�	�"%.�i���n�a�$@� �J�%�1�M����h��K�K�����K�K����X� 6����X�8N�O��� � ��K�K����X�.����]�0K���	L�K�%A�
#�#�&
�"�&@�!�0��,A�I�,M�,M�(��$�$�����L�L��1��L�L�)=�>���-N�1�&@�L�K�K�s�BF	�F
�	F
c��UO[O[O2[O222UO	[O[O
2[O222[OQ2[OQ2q!UO[OV22UO[OV22U;UO	[OV22U;UO[OV22P!�r�)rer*r�rtrfr|r�r��r;�a1�a2s&  r�test_compare_fieldless� AST_Tests.test_compare_fieldlesss���������C�G�G�I�s�w�w�y�9�:�������S�W�W�Y����	�:�;����#������
�B�������B�+�,�������B�+�,��E�������R�,�-��E�������B�+�,r c�`�Q[1Q[1Q[11FD�vqSFD�o[OV1Q5o[OV1Q5oUO[OVE2[OU2Q[OU202J�	J�	P!)r�r�r�r�z != )rrrr*r+rer��dump)r;r��sources�sourcer�r�s&     r�test_compare_modes�AST_Tests.test_compare_modess���
�Z� �
�Z� �
�|�$�
�M�D�
"���I�I�f�0���I�I�f�0������K�K��%�#�(�(�1�+��d�3�8�8�A�;�-�'H��"�
r c�
�QoUQQ2vq#UO[OV#22UO[OV#P
Q52UO[OV#P	Q52P!)c�\�[OU2[OU21!r"�r*r+�r�r�s&&rr+�7AST_Tests.test_compare_attributes_option.<locals>.parse's���9�9�Q�<����1��-�-r z2 + 2z2+2r�)rer*r�rf)r;r+r�r�s&   r�test_compare_attributes_option�(AST_Tests.test_compare_attributes_option&s\��	.��W�e�$���������A�)�*�������A�U�C�D�������Q�d�C�Dr c��[OQ]Q5[OQ]Q5q!UO[OV22UO[OVP	Q52U;UO[OVP	Q52U;UO[OVP	Q52P!)r�rNr�)r*r�rer�rXrfr�s&  r�0test_compare_attributes_option_missing_attribute�:AST_Tests.test_compare_attributes_option_missing_attribute/s������#�a�(�#�(�(�3�q�*A�B�������B�+�,�������B�t�D�E��I�������R��E�F��I�������B�t�D�Er c�R�[OQQQ5[OQQQ5UO[29^tt^2[OQQQ5PPP2UO[29^tt^2[OQQQ5PPP2[OQQQ5[OQQQ5UO[29^tt^2[OQQQ5PPP2UO[29^tt^2[OQQQ5PPP2P!)%fhK�9h)%fhK�9h)%fhKv9h)%fhP!9h)zdef foo(x, /): ...��feature_versionzdef bar(x=1, /): ...zlambda x, /: ...zlambda x=1, /: ...����r���r*r+rk�SyntaxErrorr:s&r�$test_positional_only_feature_version�.AST_Tests.test_positional_only_feature_version9s����	�	�&��?��	�	�(�&�A�
�
�
�{�
+�
+��I�I�*�F�C�,�
�
�
�{�
+�
+��I�I�,�f�E�,�	�	�	�$�f�=��	�	�&��?�
�
�
�{�
+�
+��I�I�(�&�A�,�
�
�
�{�
+�
+��I�I�*�F�C�,�
+�,�
+��
+�
+��
,�
+��
+�
+�
+�sH�E�
E/�;F�9F�E,	�%E,	�/E?	�8E?	�F	�F	�F&	�F&	c���[OQQQ5UO[29^tt^2[OQQQ5PPP2P!)%fhP!9h)z(x := 0)r�r�r�r�r:s&r�*test_assignment_expression_feature_version�4AST_Tests.test_assignment_expression_feature_versionHs>���	�	�*�f�5�
�
�
�{�
+�
+��I�I�j�&�9�,�
+�
+�
+�s�A�A+	�#A+	c���Qo[OUQQ5UO[29^tt^2[OUQQ5PPP2P!)%fhP!9h)zt""r��r���r��
r��r;r�s& r�test_pep750_tstring�AST_Tests.test_pep750_tstringMsC�����	�	�$��0�
�
�
�{�
+�
+��I�I�d�G�4�,�
+�
+�
+�s�A�A-	�%A-	c��[OQ2o[OUQQ5UO	[
29^tt^2[OUQQ5PPP2P!)%fhP!9h)zl
            try:
                ...
            except ValueError, TypeError:
                ...
        r�rr�r�rr*r+rkr�rs& r�!test_pep758_except_without_parens�+AST_Tests.test_pep758_except_without_parensS�S����� �
��	�	�	�$��0�
�
�
�{�
+�
+��I�I�d�G�4�,�
+�
+�
+���
A0�0B	�9B	c�H�[OQ2o[OQ2o[OQ2o[OQ2o[OQ2o[OQ2oUUUUUU1FD{oQ	FDqoSOU%cQLP2oUOVxQ59^tt^2[O
UQ
Q5[O
UQQ5PPP2Js	J}	P!)%fhJ�9h)zc
            try:
                ...
            except{0} TypeError:
                ...
        zj
            try:
                ...
            except{0} TypeError as exc:
                ...
        zf
            try:
                ...
            except{0} (TypeError,):
                ...
        zm
            try:
                ...
            except{0} (TypeError,) as exc:
                ...
        ze
            try:
                ...
            except{0} (TypeError):
                ...
        zl
            try:
                ...
            except{0} (TypeError) as exc:
                ...
        r)r��starr�)TFrr)r�rrr�r*r+)	r;�single_expr�single_expr_with_as�single_tuple_expr�single_tuple_expr_with_as�single_parens_expr�single_parens_expr_with_asr�rs	&        r�#test_pep758_except_with_single_expr�-AST_Tests.test_pep758_except_with_single_expr^s���o�o�'�
��'�o�o�/�
��%�O�O�-�
��%-�O�O�5�%
�!�&�_�_�.�
��&.�_�_�6�&
�"�
���%��&�

�D�&���{�{�$�3�B�7���\�\�t�\�7�7��I�I�d�G�<��I�I�d�G�<�8�7�&�
�8�7�7�s�
1D
�D!�D!c��[OQ2o[OUQQ5UO	[
29^tt^2[OUQQ5PPP2P!)%fhP!9h)zm
            try:
                ...
            except* ValueError, TypeError:
                ...
        r�rrr	rs& r�&test_pep758_except_star_without_parens�0AST_Tests.test_pep758_except_star_without_parens�rr
c�8�[OQQQ5P!)zwith (x() if y else z()): ...r�r�r�r:s&r�@test_conditional_context_managers_parse_with_low_feature_version�JAST_Tests.test_conditional_context_managers_parse_with_low_feature_version�s���	�	�1�6�Jr c���[Q2o[OU2UO[29^tt^2[OUQQ5PPP2P!)%fhP!9h)z9
        try: ...
        except* Exception: ...
        r�)r�r�)rr*r+rkr�rs& r�%test_exception_groups_feature_version�/AST_Tests.test_exception_groups_feature_version�sL����
��	�	�	�$��
�
�
�{�
+�
+��I�I�d�G�4�,�
+�
+�
+�s�A#�#A4	�,A4	c�^�,QNoSFDyoUOU29^tt^2[OU2UO[29^tt^2[OUQQ5PPP2PPP2J{	P!)%fhK9h)%fhJ�9h)�type X = intr�)r"zclass X[T]: passzdef f[T](): pass)r���r�r*r+rkr��r;�samples�samples&  r� test_type_params_feature_version�*AST_Tests.test_type_params_feature_version��q��
��
�F����f�%�%��	�	�&�!��&�&�{�3�3��I�I�f�g�>�4�&�%��4�3��&�%�%��/�4B	�B
�2B	�B�B�B	�B,
�$B,
c�^�,QNoSFDyoUOU29^tt^2[OU2UO[29^tt^2[OUQQ5PPP2PPP2J{	P!)%fhK9h)%fhJ�9h)�type X[*Ts=int] = intr�)r-zclass X[T=int]: passzdef f[**P=int](): pass)r��r$r%s&  r�(test_type_params_default_feature_version�2AST_Tests.test_type_params_default_feature_version�r*r+c�N�UO[29^tt^2[OQQQ5PPP2UO[29^tt^2[OQQQ5PPP2P!)%fhKP9h)%fhP!9h)�passr�)rr�)�r)rkr�r*r+r:s&r�"test_invalid_major_feature_version�,AST_Tests.test_invalid_major_feature_version�s`��
�
�
�z�
*�
*��I�I�f�f�5�+�
�
�
�z�
*�
*��I�I�f�f�5�+�
*�+�
*��
*�
*�
*�s#�B�B�B	�	B	�B$	�B$	c	�\�QFD�o[O[OU[O222o[OU2UO[QUQ029^tt^2[UQQ2PPP2J�	P!)%fhJ�9h)�True�"identifier field can't represent '�
' constantrr�)r7�False�None)r*r�r�r�r�rzr�r�)r;r�rUs&  r�test_constant_as_name�AST_Tests.test_constant_as_name�s{��/�H��>�>�#�(�(�8�S�X�X�Z�"@�A�D��%�%�d�+��'�'�
�6X�Ya�Xb�bl�4m�n�n���h��/�o�n�0�o�n�n�s�>B	�B+
�#B+
c	���,QNoSFDToUO[QU]*Q029^tt^2[OU]*QQ5PPP2JV	P!)%fhJk9h)r7r8r9r�r�))r7sTruᵉ)r:sFalſe)r;sNºne)rzr�r*r+)r;r�r�s&  r�test_constant_as_unicode_name�'AST_Tests.test_constant_as_unicode_name�sm��
�	�
"�H��'�'�
�4�X�a�[�M��L�N�N��	�	�(�1�+�F�3�N�N�"�N�N�N�s� A#	�#A4
�,A4
c��QQ[O2o[OU[O2P!)c�`�\sQsQsnQs\O2s\O2s\O2s	\O2s
\O2s\O2s\O2s
\O2s\O2s\s\O2s\O2s\O2s\O2s\O2s\O2s\O2s\O2s\O2sQsQsUsP!)�3AST_Tests.test_precedence_enum.<locals>._Precedence��z5Precedence table that originated from python grammar.c�\�UOU]*2![cSt!h9h�r�)r]r�r:s&rr4�8AST_Tests.test_precedence_enum.<locals>._Precedence.next�s.�� ��>�>�$��(�3�3��!� ��K� �s��	+�+�+r#)r>r?r@rAr�r5�auto�
NAMED_EXPR�TUPLE�YIELD�TEST�OR�AND�NOT�CMP�EXPR�BOR�BXOR�BAND�SHIFT�ARITH�TERM�FACTOR�POWER�AWAIT�ATOMr4rCrDrEs@r�_PrecedencerC�s�����G�����J��I�I�K�E��I�I�K�E��9�9�;�D�����B��)�)�+�C��)�)�+�C��)�)�+�C��9�9�;�D��C��9�9�;�D��9�9�;�D��I�I�K�E��I�I�K�E��9�9�;�D��Y�Y�[�F��I�I�K�E��I�I�K�E��9�9�;�D�
 �
 r r\)r5�IntEnum�_test_simple_enum�_ast_unparser\)r;r\s& r�test_precedence_enum�AST_Tests.test_precedence_enum�s*��	 �$�,�,�	 �6	
���{�L�,D�,D�Er �android順� �c��```�[OQ6XcQLQn]�n[d"[O2o[	RU2nUUU1QkoUQQ2UQQ2UQQ2UQQ2P!)	rbrcrdc	�:�VR**o[OU2VR**oQOVR2oRO[UQ59^tt^2[
O29^tt^2[OU2PPP2PPP2P!)%fhK9h)%fhP!9h)zCompiling ({!r} + {!r} * {})�r{)r*r+rrk�RecursionErrorr�infinite_recursion)�prefix�repeated�	expect_ok�broken�details�crash_depthr;�
success_depths&&   ���r�check_limit�7AST_Tests.test_ast_recursion_limit.<locals>.check_limit	s�����M�!9�9�I��I�I�i� ���4�4�F�4�;�;��+�7�G��"�"�>�w�"�?�?��/�/�1�1��I�I�f�%�2�@�?�1�1��@�?�?�s0�(C�B/	�C�/B?
�8B?
�:C�C	�C	r��()z.bz[0]z*a)�sys�platform�_testinternalcapi�get_c_recursion_remaining�min)r;�	remainingrqrorpsf  @@r�test_ast_recursion_limit�"AST_Tests.test_ast_recursion_limit�sk���"%����!:�g����
��(�)�C�C�E�I��
�y�9�M�		&�	�C����C����C����C��r c��UO[QQ59^tt^2[OQ2PPP2P!)%fhP!9h)z,source code string cannot contain null bytesrgzab)rkr�r*r+r:s&r�test_null_bytes�AST_Tests.test_null_bytessF��
�
�
�{�>��@�@��I�I�f��@�@�@�@�s�A�A	�A	c�V:�U]6�cPgQRZRZO*QRZQRZQP-!)rrO�attrr�r)rLr*rJr)rrFs"�rr�(AST_Tests.assert_none_check.__annotate__s2���0�0�d�3�7�7�m�0�3�0��0�PT�0r c	�T�UOUOQU029^tt^2[OU2o]o[OU2FD+o[Va2%fJ[
VbP2U]*
oJ-	UOU]2[OQUQUO02oUO[QUQ029^tt^2[UQQ2PPP2PPP2P!)%fhK9h)%fhP!9h)�.zfield 'z' is required for �^�$rr�)
r�r>r*r+�walkrK�setattrr]r4rQrzr�r�)r;rOr�r�r��foundrdr�s&&&&    r�assert_none_check�AST_Tests.assert_none_checks���
�\�\�T�]�]�O�1�T�F�3�
4�
4��9�9�V�$�D��E����$����e�*�*��E��.��Q�J�E�(�
���U�A�&��	�	�G�D�6�);�D�M�M�?�K�L�A��'�'�
�a��s�!�H�=�=���h��/�>�5�
4�>�=��5�
4�
4�s7�AD�0A3D�#D	�1D�D
�D
�D�D'	�D'	c� :�U]6�cPgQP-!rr#)rrFs"�rr�'AST_Tests.test_none_checks.__annotate__+s���7�7�$�7r c	�F�[OQQ1[OQQ1[OQQ1[OQQ1[OQQ	1[O
Q
Q1[OQQ
1,oSFDvq#oUOV#U2J	P!)rNzimport spam as SPAMrDzdef spam(SPAM): spam�targetz[spam for SPAM in spam]�iterz[spam for spam in SPAM]rbzspam(**SPAM)�patternzmatch spam:
 case SPAM: spam�context_exprzwith SPAM: spam)r*r�rDr�keyword�
match_caser�r�)r;�testsrOr�r�s&    r�test_none_checks�AST_Tests.test_none_checks+s���
�Y�Y�� 5�6�
�W�W�e�3�4�
�
�
��*C�D�
�
�
��(A�B�
�[�[�'�>�2�
�^�^�Y�(G�H�
�\�\�>�+<�=�
��#(��D���"�"�4�v�6�#(r c� :�U]6�cPgQP-!rr#)rrFs"�rr� AST_Tests.test_repr.__annotate__8s���R�R�4�Rr c
�^�[O2OQ2o[[	2UP	Q5FDYvq#UOUQ59^tt^2UO
[[OUP
Q52U2PPP2J[	P!)%fhJp9h)r()�strict)�
test_inputr�)
r,�	read_textr�r�r$r�r]r)r*r+)r;�	snapshotsr/�snapshots&   r�	test_repr�AST_Tests.test_repr8s{��&�0�0�2�8�8��>�	�!�"9�";�Y�t�T�T�N�D������.�.�� � ��c�i�i��u�&E�!F��Q�/�.�U�.�.�.�s�2B	�B,
�$B,
c	���QQQ**oUO[Q29^tt^2[[O[U2Q52PPP2P!)%fhP!9h)�0x0r�i'z Exceeds the limit \(\d+ digits\)rO)rzr�r)r*r�r�)r;r�s& r�test_repr_large_input_crash�%AST_Tests.test_repr_large_input_crash>sX����v��%��
�
#�
#�J�$G�I�I�����D��L�1�2�I�I�I�I�s�*A$�$A5	�-A5	c��[OQ2oUOUO]*O[O
2UOUO]*OO]*[O2[OQ2oUOUO]*O[O
2UOUO]*OO]*[O2UOUO]*OO]*[O2P!)zt"Hello"zt"Hello {name}")	r*r+r�r�rb�TemplateStr�valuesr��
Interpolationr�s& r�test_tstring�AST_Tests.test_tstringEs����y�y��$�����d�i�i��l�0�0�#�/�/�B����d�i�i��l�0�0�7�7��:�C�L�L�I��y�y�*�+�����d�i�i��l�0�0�#�/�/�B����d�i�i��l�0�0�7�7��:�C�L�L�I����d�i�i��l�0�0�7�7��:�C�<M�<M�Nr c��[OQ2o[UQ29^tt^2oUO2oPPP2[O
P	Q59^tt^2o[OQ2[OQQQ5[OW2PPP2UO[QW22,QN2SFD?oUOUOQ2UOUO[2JA	[O
P	Q59^tt^2o[OQ2[OQQ	Q5[OQQQ5[OWUQ
Q5PPP2UO[QU22,QN2SFD?oUOUOU2UOUO[2JA	P!)%fhCK�9h)%fhCK�9h)%fhK�9h)
z#test_import/data/syntax_warnings.py�rb)�record�error�alwaysz<unknown>\z)r�c3�D�SF �DpOw�	J	P!3hr"rN�r,�wms& rr.�BAST_Tests.test_filter_syntax_warnings_by_module.<locals>.<genexpr>Y���D���D�b�	�	�D��� �	<unknown>zpackage\.module\zzpackage.modulec3�D�SF �DpOw�	J	P!3hr"rNr�s& rr.r�cr�r�)r3r�r�)r�findfile�open�read�warnings�catch_warnings�simplefilter�filterwarningsr*r+r]�sorted�filenamer�category�
SyntaxWarning)r;r��fr��wlogr�s&     r�%test_filter_syntax_warnings_by_module�/AST_Tests.test_filter_syntax_warnings_by_moduleQs����#�#�$I�J��
�(�D�
!�
!�Q��V�V�X�F�"�
�
$�
$�D�
1�
1�T��!�!�'�*��#�#�H�^�D��I�I�f��2�	
����9�D�9�9�:�F��B����R�[�[�+�6��M�M�"�+�+�}�5���
$�
$�D�
1�
1�T��!�!�'�*��#�#�H�5I�J��#�#�G�L�A��I�I�f�h�/?�@�	2�
	
����9�D�9�9�:�F��B����R�[�[�(�3��M�M�"�+�+�}�5��#"�
!�
!��
1�
1�
1��2�
1�s7�H�$AH �9A H4�H	�H	� H1	�)H1	�4I	�=I	r#)Pr>r?r@rA�maxDiffrPr\rqr|r�r�r�r�r�r�r�r�r�r�r�rrrrr"r%rrFrJrRrhrkryr}r�r�r�r�rrBr�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrrrr(r/r4r<r?r`r
rtrurrrzr}r�r�r�r�r�r�rCrDrEs@rrHrH=s������G�3�D�&� �.	!�
1�.�/�
I�6�4*�,�(@B�D9B�v$�%�'�$3�L/�:�	+��*&�*)�#4�J%�('�
1?�f(�
;�K�-�F�
���>��>�9�>3�
I�
�D�<*�X-��E�F�
D�:�
5�	5�7=�r	5�K�5�
?�
?�6�0�	4�F�<
����!�!�S�\�\�Y�-F�'�G�T���#�%��&� �U���0�
0�0�7�7�R�R�3�
O�6�6r rHc�`�\sQsQsnQs\Q2sQs\Q2s	Qs
QsQsQ	s
Q
sQsQsQ
sQsQsQsQsQsUsP!)�	CopyTestsiiz$Test copying and pickling AST nodes.c#�b` �U1QknR[O2FPiw�K
P!K3h)z�Iterate over the (native) subclasses of ast.AST recursively.

This excludes:
  * abstract AST nodes
  * the special class ast.Index, since its constructor returns
    an integer.
c3�: �UOQ6wcP!U[OIcP![OU2%cP!Uw�	UO2FDoRU2FPiw�K
J	P!K
3h)r*)r?r*rr*r+r5)r7r-�dos& �rr��&CopyTests.iter_ast_classes.<locals>.dous`�����~�~��&���c�i�i���� � ��%�%���I��)�)�+���c�7�"�"�,�"�s!�A?�A?�A?�
'A?�1A=
�2A?)r*rJ)r�s@r�iter_ast_classes�CopyTests.iter_ast_classesls����	#��c�g�g�;���s�"/�-�/c��]PHo[UO]*2FD�o[FDxoUO	V2Q59^tt^2[UQQQ2oUO
UOVB22oUO[U2[U22PPP2Jz	J�	P!)%fhJ�9h)r)r��protocolr�r��)
�picklerE�HIGHEST_PROTOCOLrr�r��loads�dumpsr]r)r;r�r�r�r��ast2s&     r�
test_pickling�CopyTests.test_pickling�s�����f�5�5��9�:�H�"�
���\�\�t�\�?�?�"�4��f�e�<�D�!�<�<����T�(D�E�D��$�$�X�d�^�X�d�^�D�@�?�#�;�?�?�?�s�
AB/
�/C�8Cc��Qo[O[OU22o[OU2FD'o[O
U2FD	oV4mJ	J)	[O]�29^tt^2[OU2oPPP2[OU2FDo[UQ2%fJU;J	[OW2FD�o[O
U2FD�o[UQ2%fJ[U[O[O[O[O [O"12%cJvUO%['UO2['U22J�	J�	P!)%fhCK$9h[OS2FDo[SQ2%fJS;J	h9h)a=
        ('',)
        while i < n:
            if ch == '':
                ch = format[i]
                if ch == '':
                    if freplace is None:
                        '' % getattr(object)
                elif ch == '':
                    if zreplace is None:
                        if hasattr:
                            offset = object.utcoffset()
                            if offset is not None:
                                if offset.days < 0:
                                    offset = -offset
                                h = divmod(timedelta(hours=0))
                                if u:
                                    zreplace = '' % (sign,)
                                elif s:
                                    zreplace = '' % (sign,)
                                else:
                                    zreplace = '' % (sign,)
                elif ch == '':
                    if Zreplace is None:
                        Zreplace = ''
                        if hasattr(object):
                            s = object.tzname()
                            if s is not None:
                                Zreplace = s.replace('')
                    newformat.append(Zreplace)
                else:
                    push('')
            else:
                push(ch)

        �parent)r*r+r�rr��iter_child_nodesr�rri�copy�deepcopy�hasattrrKru�boolop�unaryopr��operatorr]r)r;r�r�rOrd�tree2s&     r�test_copy_with_parents� CopyTests.test_copy_with_parents�s[��#��H�y�y�����.�/���H�H�T�N�D��-�-�d�3��#��4�#�	$��+�+�C�0�0��
�
�d�+��1�
�������4��*�*���'��H�H�U�O�D��-�-�d�3���5�(�+�+�J�u��$�$�c�j�j�#�+�+�s�y�y�#�,�,�G�5�5��$�$�X�e�l�l�%;�X�d�^�L�	4�$�1�0�0��
�������4��*�*���'�s0�1G�G�&G�G	�
G	�	G�*H�Hc�&�UO2FD�oUOUQ59^tt^2UOUQ2PPP2[UO2oUOVQ59^tt^2UQ-[
O
U2@oUO[[OU]2UO[UO]2PPP2J�	P!)%fhK�9h)%fhJ�9h))�klass�__replace__)r��fieldsr#)r�r��
assertHasAttr�setrTr��fromkeysrkrnr��replacer�)r;r�r�rOs&   r�test_replace_interface� CopyTests.test_replace_interface�s����*�*�,�E����E��*�*��"�"�5�-�8�+�����'�F����E��9�9��5�t�}�}�V�4�5���!�!�)�T�\�\�4��C��!�!�)�T�-=�-=�q�A�	:�9�-�*�*��:�9�9�s$�C,	�:A$C?	�,C<
�5C<
�?D
�D
c���UO2FCD�o[UO2o[UO2oUO	VUQ59^tt^2STt-tFD
pD[2aJ	ooSTt-tFD
pf[2aJ	ooUQ-U@o[OU2o	UO[OV�P	Q52UQ-U@U@o[OU2o	UO[OV�P	Q52SFD�o-U1FD�o
UQ-U@U
@o[2o[OU1-VK-@o	SFDdoV\*o
UO[V�2U
2V�6wcUO[V�2U
2JIUO[V�2U2Jf	UO[OV�P	Q52J�	J�	SFD�oUQ-U@U@o[2o[OU1-V�-@o	SFDioUU*oUO[UU2U2UU6wcUO[U	U2U2JMUO[U	U2U2Jk	UO[OV�P	Q52J�	PPP2CJ�	P!ttohttoh)%fhCJ�9h))r�r��
attributesr�r#)r�r�rTr�r�r2r�r�rer*r�rr[rf)r;r�r�r��field�
old_fieldsr��	old_attrsrO�repl�
init_attrs�	new_valuer�ru�	attribute�new_attrr��old_attrs&                 r�test_replace_native�CopyTests.test_replace_native�si���*�*�,�,�E�����'�F��U�.�.�/�J����E�Z��P�P�<B�B�6�%�V�X�o�6�
�B�8B�C�
��6�8�^�
�	�C��*�z�*���|�|�D�)��������D�4� P�Q��7�z�7�Y�7���|�|�D�)��������D�4� P�Q�#�E�')�9�o�
�$�@�z�@�Z�@��$*�H�	�#�|�|�D�G�U�4F�G��!'�A�(2�
�I� �M�M�'�$�*:�I�F� �z� $�
�
�g�d�.>�	� J� $�
�
�g�d�.>�	� J�"(��(�(����T�TX�)Y�Z�'6�$�$",�I� �;�:�;��;�D�%�x�H��<�<��F��0E�F�D�'��#,�Q�<���
�
�g�d�A�&6��A��	�>� �M�M�'�$��*:�H�E� �M�M�'�$��*:�H�E�(��$�$�S�[�[��PT�%U�V�",�CQ�P�	-��C��C�	Q�P�P�s?�K	� K�5K	�:K�C:K	�
CK	�A)K	�
K	�K/
�&K/
c��[2[2q![OVQ5oUOUOU2UOUO
U2[2o[OV4Q5oUOUOU2UOUO
U2UOUOU2UOUO
UO
2P!)�r��ctx�r�)r2r*r�rr�r�r�r�)r;�nidr�rO�new_nidr�s&     r�&test_replace_accept_known_class_fields�0CopyTests.test_replace_accept_known_class_fieldss����8�V�X�S��x�x�3�(���
�
�d�g�g�s�#��
�
�d�h�h��$��(���|�|�D�-���
�
�d�g�g�s�#��
�
�d�h�h��$��
�
�d�g�g�w�'��
�
�d�h�h����)r c���[OQ2O]*OoUO	UO
Q2UO	UO]2[2o[OVQ5oUO	UO]2UO	UO
UO
2UO	UOUO2UO	UOU2UO2vqEUO	UQ*Q2UO	UQ*UO2UO	UQ*]2UO2vqEUO	UQ*Q2UO	UQ*UO2UO	UQ*U2P!)rprNr�r�rX)r*r+r�rbr]r�rXr2r�r�r��
__reduce__)r;rOrXr��_�states&     r�*test_replace_accept_known_class_attributes�4CopyTests.test_replace_accept_known_class_attributessW���y�y��~�"�"�1�%�+�+��������#�&�������a�(�����|�|�D�0��������a�(�������$�'�'�*�������4�8�8�,�������f�-��o�o�'���1�����t��c�*�����u��t�x�x�0�����x��!�,��o�o�'���1�����t��c�*�����u��t�x�x�0�����x��&�1r c�"�QQ[O2oQ[2q2UV#2oUOUOU2UOUO
U2[OU2oUOUOU2UOUO
U2UOUOU2UOUO
U2UV#2o[2o[OVFQ5oUOUOU2UOUO
U2UOUOUO2UOUO
U2P!)c�,�\sQsQsQsQ\Q\-sQsQs	P!)�GCopyTests.test_replace_accept_known_custom_class_fields.<locals>.MyNodei6rNrr#)rNr)
r>r?r@rArTrr2r0r^rCr#r r�MyNoder
6s��&�G�%�s�F�F�;�O�-�Nr rrN)r)r*rJr2rrNrr�r�)r;rrNrrOr��	repl_datas&      r�-test_replace_accept_known_custom_class_fields�7CopyTests.test_replace_accept_known_custom_class_fields5s��	.�S�W�W�	.�
�V�X�d��d�!���
�
�d�i�i��&��
�
�d�i�i��&��|�|�D�!���
�
�d�i�i��&��
�
�d�i�i��&��
�
�d�i�i��&��
�
�d�i�i��&��d�!���H�	��|�|�D�1���
�
�d�i�i��&��
�
�d�i�i��&��
�
�d�i�i����+��
�
�d�i�i��+r c���QQ[O2oU2oUOUO]2UOUO]2[2o[OV#Q5oUOUO]2UOUO]2UOUO]2UOUOU2P!)c�$�\sQsQs]s]sQsQsP!)�KCopyTests.test_replace_accept_known_custom_class_attributes.<locals>.MyNodeiUr#�rpr
)r>r?r@rArpr
r�rCr#r rrrUs���A��A�$�Kr r)r
)r*rJr]rpr
r2r�r�)r;rrOr
r�s&    r�1test_replace_accept_known_custom_class_attributes�;CopyTests.test_replace_accept_known_custom_class_attributesTs���	%�S�W�W�	%�
�x���������#��������#��H���|�|�D�&���������#��������#��������#��������#r c�H�[OQ2O]*Oo[	29UmoUOoUOUOQ2UOUOU2UOUO
U2[OU2oUOUOQ2UOUOU2UOUO
U2UOUOQ2UOUOU2UO[[UQ2[OUQQ5oUOUOQ2UOUOU2UOUO
U2UOUOQ2UOUOU2UO[[UQ2P!)rp�extrar
r)r*r+r�rbr2rr�rr�r�r�rkrlr[)r;rOr�contextr�s&    r�0test_replace_ignore_known_custom_instance_fields�:CopyTests.test_replace_ignore_known_custom_instance_fieldsgsk���y�y��~�"�"�1�%�+�+��#�X�%��
�U��(�(��	
�
�
�d�g�g�s�#��
�
�d�h�h��(��
�
�d�j�j�%�(��|�|�D�!���
�
�d�g�g�s�#��
�
�d�h�h��(��
�
�d�j�j�%�(��
�
�d�g�g�s�#��
�
�d�h�h��(����.�'�4��A��|�|�D�S�)���
�
�d�g�g�s�#��
�
�d�h�h��(��
�
�d�j�j�%�(��
�
�d�g�g�s�#��
�
�d�h�h��(����.�'�4��Ar c�2�[OQ2O]*OoUOoU;UO
[[UQ2UOUOU2QoUO[[OU229^tt^2[OU2PPP2UO
[[UQ2UOUOU2[OQ2O]*OoUOoU;UO
[[UQ2UOUOU2[OUQQ5oUO
[[UQ2UOUOU2UOUO
Q2UOUOU2P!)%fhCKJ9h)rpr��>ast.Name.__init__ missing 1 required positional argument: 'id'r
r)r*r+r�rbr�r�rkrlr[rrzrnr4rQr�r�)r;rOrr{r�s&    r�!test_replace_reject_missing_field�+CopyTests.test_replace_reject_missing_field�sg���y�y��~�"�"�1�%�+�+���(�(���G����.�'�4��>��
�
�d�h�h��(�N��
�
#�
#�I�r�y�y��~�
>�
>��L�L���?�	
���.�'�4��>��
�
�d�h�h��(��y�y��~�"�"�1�%�+�+���(�(���G����.�'�4��>��
�
�d�h�h��(��|�|�D�S�)�����.�'�4��>��
�
�d�h�h��(��
�
�d�g�g�s�#��
�
�d�h�h��(�%?�
>�
>�s�-H�H	�H	c��[OQ[O2Q5oUOUOP2UOUO,2[OUQQ5oUOUOQ2UOUOP2UOUO,2P!)r�rNr>r
�rN)
r*�FunctionDefrCr�returnsr]rSr�r�rN)r;rO�node2s&  r�.test_replace_accept_missing_field_with_default�8CopyTests.test_replace_accept_missing_field_with_default�s������E��
�
��@���
�
�d�l�l�D�)�����,�,�b�1����T��.��������U�+��
�
�e�m�m�T�*�����-�-�r�2r c�@�[OQ2O]*Oo[	29UmoUOoUOUQ2QoUO[[OU229^tt^2[OU]Q5PPP2UOUOQ2UOUOU2UOUO
U2P!)%fhKf9h)rprz<ast.Name.__init__ got an unexpected keyword argument 'extra')r)r*r+r�rbr2rr�r�rzrnr4rQr�r�rr�)r;rOrrr{s&    r�8test_replace_reject_known_custom_instance_fields_commits�BCopyTests.test_replace_reject_known_custom_instance_fields_commits�s����y�y��~�"�"�1�%�+�+��#�X�%��
�U��(�(��	
���4��)�L��
�
#�
#�I�r�y�y��~�
>�
>��L�L��Q�'�?�	
�
�
�d�g�g�s�#��
�
�d�h�h��(��
�
�d�j�j�%�(�?�
>�s�D
�
D	�D	c�2�[OQ2O]*OoUOoUO[[UQ2QoUO[[OU229^tt^2[OU]Q5PPP2UOUOQ2UOUOU2UO[[UQ2P!)%fhKf9h)rp�unknownz>ast.Name.__init__ got an unexpected keyword argument 'unknown')r-)r*r+r�rbr�rkrlr[rzrnr4rQr�r�rr�)r;rOrr{s&   r�+test_replace_reject_unknown_instance_fields�5CopyTests.test_replace_reject_unknown_instance_fields�s����y�y��~�"�"�1�%�+�+���(�(��	
���.�'�4��C�N��
�
#�
#�I�r�y�y��~�
>�
>��L�L��q�)�?�	
�
�
�d�g�g�s�#��
�
�d�h�h��(����.�'�4��C�?�
>�s�D�D	�D	c���[OQQ5oQoUO[U29^tt^2UOQ-[2Q-@PPP2P!)%fhP!9h)rpr�1got an unexpected keyword argument <object objectr
r#)r*r�rzrnr�r2)r;rO�errmsgs&  r�test_replace_non_str_kwarg�$CopyTests.test_replace_non_str_kwarg�sN���x�x�3���D��
�
#�
#�I�v�
6�
6����/���#��/�7�
6�
6�
6�s�A!�!A2	�*A2	r#)r>r?r@rAr��staticmethodr�r�r	r�r�r�rr	rrrrr'r*r.r3rCrDrEs@rr�r�is}����.�����.E�"�9M�"�9M�v
B�4W�l*� 2�2,�>$�&B�>)�:3�
)�D�0�0r r�c�*`�\sQsQsnPsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs \!2\"2Q22s#\!2\"2Q22s$Q s%Us&P!)!�ASTHelpers_Testi�c���[OQ2o[QQQ[O2oUO	[O
U2[O
U22P!)z
foo(1 + 1)r�r�)r*r+r�r�r]r�r�s&  r�
test_parse�ASTHelpers_Test.test_parse�sF���I�I�l�#���L�+�v�s�7H�7H�I��������!��c�h�h�q�k�2r c�*�]]*P![czSO[29^tt^2o[OQ2PPP2L)%fhL9hSOWOO2P!h9h)r�z'\U')�	Exceptionrkr�r*�literal_evalr6r��__context__�r;r�s& r�test_parse_in_error�#ASTHelpers_Test.test_parse_in_error�sg��	:�
�a�C�C���	:��"�"�;�/�/�1�� � ��)�0�/�/�/��� � ����!8�!8�9�	:�s1�	�	B�B�A�
	B�A&�A&�!-B�Bc� �[OQ2oUO[OU2Q2UO[OUP
Q5Q2UO[OUP	Q5Q2P!)�spam(eggs, "and cheese")�kModule(body=[Expr(value=Call(func=Name(id='spam'), args=[Name(id='eggs'), Constant(value='and cheese')]))])��annotate_fieldszJModule([Expr(Call(Name('spam'), [Name('eggs'), Constant('and cheese')]))])��include_attributesa�Module(body=[Expr(value=Call(func=Name(id='spam', lineno=1, col_offset=0, end_lineno=1, end_col_offset=4), args=[Name(id='eggs', lineno=1, col_offset=5, end_lineno=1, end_col_offset=9), Constant(value='and cheese', lineno=1, col_offset=11, end_lineno=1, end_col_offset=23)], lineno=1, col_offset=0, end_lineno=1, end_col_offset=24), lineno=1, col_offset=0, end_lineno=1, end_col_offset=24)])�r*r+r]r��r;rOs& r�	test_dump�ASTHelpers_Test.test_dump�st���y�y�3�4��������$��
G�	
�	
������$��>�
*�	
�	
������$�4�@�
I�	
r c�(�[OQ2oUO[OU]Q5Q2UO[OUP
QQ5Q2UO[OUP	]Q5Q2P!)rC��indentz�Module(
   body=[
      Expr(
         value=Call(
            func=Name(id='spam'),
            args=[
               Name(id='eggs'),
               Constant(value='and cheese')]))])�	)rFrOzgModule(
	[
		Expr(
			Call(
				Name('spam'),
				[
					Name('eggs'),
					Constant('and cheese')]))]))rHrOa*Module(
   body=[
      Expr(
         value=Call(
            func=Name(
               id='spam',
               lineno=1,
               col_offset=0,
               end_lineno=1,
               end_col_offset=4),
            args=[
               Name(
                  id='eggs',
                  lineno=1,
                  col_offset=5,
                  end_lineno=1,
                  end_col_offset=9),
               Constant(
                  value='and cheese',
                  lineno=1,
                  col_offset=11,
                  end_lineno=1,
                  end_col_offset=23)],
            lineno=1,
            col_offset=0,
            end_lineno=1,
            end_col_offset=24),
         lineno=1,
         col_offset=0,
         end_lineno=1,
         end_col_offset=24)])rIrJs& r�test_dump_indent� ASTHelpers_Test.test_dump_indent�s{���y�y�3�4��������$�q�1�44�	5�	
������$��d�K�N)�	*�	
������$�4��J�M!�	"r c��[O]]Q5oUO[OU2Q2UO[OUP	Q5Q2[O[OQ[O
2Q5]]Q5oUO[OU2Q2UO[OUP
Q	5Q
2UO[OUP	Q5Q2UO[OUP
P	Q5Q
2[O[OQ[O
2Q5Q5oUO[OU2Q2UO[OUP
Q	5Q2[O[OQ2,Q5oUO[OUP
Q	5Q2[O[OQ2,Q5oUO[OUP
Q	5Q2[O[OQ2,[OQ2,Q5oUO[OUP
Q	5Q2[O[OQ2,[OQ2,Q5oUO[OUP
Q	5Q2[O2oUO[OUP
Q	5Q2[OQ,[OQ[OP22,,[OQ[O
2Q5,2oUO[OU2Q 2UO[OUP
Q	5Q!2P!)"r�r�zRaise()rGzRaise(lineno=3, col_offset=4)r�r�)�excrXrYzRaise(exc=Name(id='e'))rEzRaise(Name('e'))z/Raise(exc=Name(id='e'), lineno=3, col_offset=4))rFrHz(Raise(Name('e'), lineno=3, col_offset=4))�causezRaise(cause=Name(id='e'))zRaise(cause=Name('e'))rpr�zarguments([], [arg('x')])�r=zarguments([arg('x')])r
)r=r?z,arguments([arg('x')], kwonlyargs=[arg('y')]))r>r?z0arguments([], [arg('x')], kwonlyargs=[arg('y')])�arguments()�Tr��	dataclass�r�zrClassDef(name='T', keywords=[keyword(arg='a', value=Constant(value=None))], decorator_list=[Name(id='dataclass')])zJClassDef('T', [], [keyword('a', Constant(None))], [], [Name('dataclass')]))r*�Raiser]r�r�r�rCrD�ClassDefr�r�rJs& r�test_dump_incomplete�$ASTHelpers_Test.test_dump_incomplete)s����y�y��a�0��������$���	
�	
������$�4�@�+�	
��y�y�S�X�X��#�(�(�*�=�a�TU�V��������$��%�	
�	
������$��>��	
�	
������$�4�@�=�	
�	
������$��RV�W�6�	
��y�y�s�x�x�3�C�H�H�J�?�@��������$��'�	
�	
������$��>�$�	
��}�}�3�7�7�3�<�.�1��������$��>�'�	
��}�}�#�'�'�#�,��8��������$��>�#�	
��}�}�#�'�'�#�,��S�W�W�S�\�N�S��������$��>�:�	
��}�}�3�7�7�3�<�.�c�g�g�c�l�^�L��������$��>�>�	
��}�}���������$��>��	
��|�|���
�[�[��c�l�l�4�0�
1�2��
�X�X�k�s�x�x�z�
2�3�
��	
������$��
A�	
�	
������$��>�X�	
r c�P``�U1QknU1QkoR[O2QQQ5R[OP[O2Q5QQQ5R[OPQ5Q	Q	Q5R[O,Q5Q
Q
Q5R[O
PQ5QQQ5R[O
,Q5QQQ5R[O
PQ5Q
Q
Q5R[O[O
]*2PPQ5QQQ5R[O[O
]*2,PQ5QQQ5UQQQQ5UQQQP	Q5UQQQQ5UQQQQ5UQQQQ5P!) c	�:�ROP
Q59^tt^2RO[OU1QP
-U@U2PPP2ROP	Q59^tt^2RO[OU1QP	-U@U2PPP2P!)%fhK_9h)%fhP!9h)F)�
show_emptyra)r�r]r*r�)rO�empty�fullr8r;s&&&,�r�
check_node�8ASTHelpers_Test.test_dump_show_empty.<locals>.check_nodejs���������/�/�� � ��H�H�T�>�e�>�v�>���0�
�����.�.�� � ��H�H�T�=�d�=�f�=���/�.�0�/��
/�.�.�s#�+B�*+B2�B/	�(B/	�2C	�;C	c�H:�R[OU2V1-U@P!r"r�)r�rbrcr8rds&&&,�r�
check_text�8ASTHelpers_Test.test_dump_show_empty.<locals>.check_textvs����s�y�y����>�v�>r rWzNarguments(posonlyargs=[], args=[], kwonlyargs=[], kw_defaults=[], defaults=[]))rbrcr�zName(id='')zName(id='', ctx=Load())rOzMatchSingleton(value=None)zMatchSingleton(value=[])zConstant(value=None)zConstant(value=[])zConstant(value=''))rbr�
conversionz@Interpolation(value=Constant(value=42), str=None, conversion=-1)z>Interpolation(value=Constant(value=42), str=[], conversion=-1)zdef a(b: int = 0, *, c): ...z�Module(body=[FunctionDef(name='a', args=arguments(args=[arg(arg='b', annotation=Name(id='int'))], kwonlyargs=[arg(arg='c')], kw_defaults=[None], defaults=[Constant(value=0)]), body=[Expr(value=Constant(value=Ellipsis))])])a.Module(body=[FunctionDef(name='a', args=arguments(posonlyargs=[], args=[arg(arg='b', annotation=Name(id='int', ctx=Load()))], kwonlyargs=[arg(arg='c')], kw_defaults=[None], defaults=[Constant(value=0)]), body=[Expr(value=Constant(value=Ellipsis))], decorator_list=[], type_params=[])], type_ignores=[])aqModule(body=[FunctionDef(name='a', args=arguments(args=[arg(arg='b', annotation=Name(id='int', lineno=1, col_offset=9, end_lineno=1, end_col_offset=12), lineno=1, col_offset=6, end_lineno=1, end_col_offset=12)], kwonlyargs=[arg(arg='c', lineno=1, col_offset=21, end_lineno=1, end_col_offset=22)], kw_defaults=[None], defaults=[Constant(value=0, lineno=1, col_offset=15, end_lineno=1, end_col_offset=16)]), body=[Expr(value=Constant(value=Ellipsis, lineno=1, col_offset=25, end_lineno=1, end_col_offset=28), lineno=1, col_offset=25, end_lineno=1, end_col_offset=28)], lineno=1, col_offset=0, end_lineno=1, end_col_offset=28)])a�Module(body=[FunctionDef(name='a', args=arguments(posonlyargs=[], args=[arg(arg='b', annotation=Name(id='int', ctx=Load(), lineno=1, col_offset=9, end_lineno=1, end_col_offset=12), lineno=1, col_offset=6, end_lineno=1, end_col_offset=12)], kwonlyargs=[arg(arg='c', lineno=1, col_offset=21, end_lineno=1, end_col_offset=22)], kw_defaults=[None], defaults=[Constant(value=0, lineno=1, col_offset=15, end_lineno=1, end_col_offset=16)]), body=[Expr(value=Constant(value=Ellipsis, lineno=1, col_offset=25, end_lineno=1, end_col_offset=28), lineno=1, col_offset=25, end_lineno=1, end_col_offset=28)], decorator_list=[], type_params=[], lineno=1, col_offset=0, end_lineno=1, end_col_offset=28)], type_ignores=[]))rbrcrHrCrDz�Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load()), args=[Name(id='eggs', ctx=Load()), Constant(value='and cheese')], keywords=[]))], type_ignores=[])zspam(eggs, text="and cheese")z�Module(body=[Expr(value=Call(func=Name(id='spam'), args=[Name(id='eggs')], keywords=[keyword(arg='text', value=Constant(value='and cheese'))]))])z�Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load()), args=[Name(id='eggs', ctx=Load())], keywords=[keyword(arg='text', value=Constant(value='and cheese'))]))], type_ignores=[])z*import _ast as ast; from module import subz�Module(body=[Import(names=[alias(name='_ast', asname='ast')], is_lazy=0), ImportFrom(module='module', names=[alias(name='sub')], level=0, is_lazy=0)])z�Module(body=[Import(names=[alias(name='_ast', asname='ast')], is_lazy=0), ImportFrom(module='module', names=[alias(name='sub')], level=0, is_lazy=0)], type_ignores=[]))r*rCr�r��MatchSingletonr�r�)r;rgrdsf @r�test_dump_show_empty�$ASTHelpers_Test.test_dump_show_emptyis����
	�	?�	��M�M�O��a�	
�	��H�H�����
�+��*�		
�	����T�*�.�-�	
�	����R�(�,�+�	
�	��L�L�t�$�(�'�	
�	��L�L�r�"�&�%�	
�	��L�L�r�"�&�%�	
�	����C�L�L��$4�$�2�N�T�S�	
�	����C�L�L��$4�"��L�R�Q�	
�	�*�s�B�	
�	�*�F
�U�#�		
�	�&��u�	
�	�+�f�N�	
�	�8�k�{�	
r c���[OQ2oUOQ[OU22UOQ[OUP
Q52UO	Q[OUP	Q52[O
QQ5oUO
[OU2Q2UO	Q[OUP	Q52P!)�x = 1z[)�colorzrOzConstant(value='\x1b[31m')z
'\x1b[31m')r*r+�assertNotInr�r�r�r]rJs& r�test_dump_with_color�$ASTHelpers_Test.test_dump_with_color�s����y�y��!������#�(�(�4�.�1�����#�(�(�4�u�"=�>��
�
�g�s�x�x��D�9�:��|�|�*�-��������$��)F�G��
�
�m�S�X�X�d�$�%?�@r c	���[OQQQ5o[O[O]2UOO
2UOmUO
[OUP	Q5Q2[OQ[O22o[O]]]]UQ5o[OU[OPPUQ52oUOUO2UOUO2UO
UO]2UO
UO]2P!)�1 + 1r�r�rGz�Expression(body=BinOp(left=Constant(value=1, lineno=1, col_offset=0, end_lineno=1, end_col_offset=1), op=Add(), right=Constant(value=2, lineno=1, col_offset=4, end_lineno=1, end_col_offset=5), lineno=1, col_offset=0, end_lineno=1, end_col_offset=5))rZ)rYrXr�r��func)rYrXru)r*r+�
copy_locationr�r�rpr]r�r�r��Callr�r�r�rXrY)r;�srcru�news&   r�test_copy_location�"ASTHelpers_Test.test_copy_location�s����i�i��f�-���*�*�3�<�<��?�C�H�H�N�N�K�����������#�$�?�
=�	
��x�x�����
�+���h�h�!�A�!�A�TX�Y������S�X�X��d�QU�%V�W�����#�.�.�)����#�,�,�-�������Q�'��������+r c���[OQ2oUOO[O[O
[OQ[O22[OQ2,,222UOU[OU22PUmUO[OUP	Q5Q2P!)z
write("spam")rZr�rGa_Module(body=[Expr(value=Call(func=Name(id='write', lineno=1, col_offset=0, end_lineno=1, end_col_offset=5), args=[Constant(value='spam', lineno=1, col_offset=6, end_lineno=1, end_col_offset=12)], lineno=1, col_offset=0, end_lineno=1, end_col_offset=13), lineno=1, col_offset=0, end_lineno=1, end_col_offset=13), Expr(value=Call(func=Name(id='spam', lineno=1, col_offset=0, end_lineno=1, end_col_offset=0), args=[Constant(value='eggs', lineno=1, col_offset=0, end_lineno=1, end_col_offset=0)], lineno=1, col_offset=0, end_lineno=1, end_col_offset=0), lineno=1, col_offset=0, end_lineno=1, end_col_offset=0)]))
r*r+r��appendr�rwr�r�r�r]r�r�r��r;rxs& r�test_fix_missing_locations�*ASTHelpers_Test.test_fix_missing_locations�s����i�i��(�������������#�(�(�6�3�8�8�:�*F�+.�<�<��+?�*@�"�"F�G�	H�����c�7�7��<�=����������#�$�?�	
[�	
r c��[OQQQ5oUO[OU]Q5U2UO[OUP	Q5Q2[OQQQ5oUO[OUO
]Q5UO
2UO[OUP	Q5Q2[O[OQ[O22,,]Q5oUO[OU2O]2UO[OU2O2P!)rtr�r��rgrGz�Expression(body=BinOp(left=Constant(value=1, lineno=4, col_offset=0, end_lineno=4, end_col_offset=1), op=Add(), right=Constant(value=1, lineno=4, col_offset=4, end_lineno=4, end_col_offset=5), lineno=4, col_offset=0, end_lineno=4, end_col_offset=5))r/)rur>�keywordsrX)r*r+r]�increment_linenor�r�rwr�r�rXr�r�r~s& r�test_increment_lineno�%ASTHelpers_Test.test_increment_lineno�s���i�i��f�-������-�-�c�Q�7��=�������#�$�?�
=�	
��i�i��f�-������-�-�c�h�h�!�<�c�h�h�G�������#�$�?�
=�	
��h�h����&�#�(�(�*�-�B��A�
��	
����-�-�c�2�9�9�1�=����#�.�.�s�3�>�>�?r c��[O[Q2P	Q5o[OU]Q5UO	UO
]*O]2UO	UO
]*O]	2UO	UO
]*OQ2P!)zb        a = 1
        b = 2 # type: ignore
        c = 3
        d = 4 # type: ignore@tag
        )�
type_commentsr�z@tag)r*r+rr�r]r�rX�tagr~s& r�test_increment_lineno_on_module�/ASTHelpers_Test.test_increment_lineno_on_modules����i�i�� �
�
!�"��	���S�A�&�����)�)�!�,�3�3�Q�7�����)�)�!�,�3�3�Q�7�����)�)�!�,�0�0�&�9r c��[OQQQ5o[[OUO22oUOUO
Q2OQ2UOUQ,Q,-2P!)�foo()r�r�rurr�r>)r*r+r��iter_fieldsr�r]�popr�)r;rO�ds&  r�test_iter_fields� ASTHelpers_Test.test_iter_fields!s`���y�y��v�.���������+�,��������v��)�)�5�1�����Z��V�R�8�9r c	�8�[OQQQ5oUO[[	[O
UO222]2[O
UO2oUO[U2OQ2UO[U2O]2UO[U2O]*2UO[O[U22Q2P!)zspam(23, 42, eggs='leek')r�r�rZz1keyword(arg='eggs', value=Constant(value='leek')))r*r+r]r�rr�r�r4r�rbr�)r;rO�iterators&  r�test_iter_child_nodes�%ASTHelpers_Test.test_iter_child_nodes's����y�y�4�6�B������T�#�"6�"6�t�y�y�"A�B�C�Q�G��'�'��	�	�2������h��*�*�F�3�����h��-�-�r�2�����h��-�-�r�2�������$�x�.�1�?�	
r c��[OQP
Q5oUO[OU2Q2[OQP
Q5oUO[OUO]*2Q2[OQP
Q5oUO[OUO]*2Q2[OQP
Q5oUO[OUO]*2Q2[OQP
Q5oUO[OUO]*P
Q5Q2[OQ	2oUO[[OUO]*2P!)
z"""line one
  line two"""r�zline one
line twoz&class foo:
  """line one
  line two"""z&def foo():
  """line one
  line two"""z#async def foo():
  """spam
  ham"""zspam
ham)�cleanz
spam
  hamrp)r*r+r]�
get_docstringr�rkrnrJs& r�test_get_docstring�"ASTHelpers_Test.test_get_docstring2s<���y�y�5��F������*�*�4�0�-�	/��y�y�C�e�T������*�*�4�9�9�Q�<�8�-�	/��y�y�C�e�T������*�*�4�9�9�Q�<�8�-�	/��y�y�@�5�Q������*�*�4�9�9�Q�<�8�+�F��y�y�@�5�Q������*�*�4�9�9�Q�<�u�E�}�U��y�y��~�����)�S�%6�%6��	�	�!��Er c�&�UO[O[OP222[OQ2oUO[OU22[OQ2oUO[OU22[OQ2oUO[OUO]*22[OQ2oUO[OUO]*22[OQ2oUO[OUO]*22[OQ2oUO[OUO]*22[OQ2oUO[OUO]*22[OQ2oUO[OUO]*22[OQ2oUO[OUO]*22[OQ	2oUO[OUO]*22P!)
�zx = "not docstring"zdef foo():
  passzclass foo:
  passz class foo:
  x = "not docstring"z class foo:
  def bar(self): passz def foo():
  x = "not docstring"zasync def foo():
  passz&async def foo():
  x = "not docstring"zasync def foo():
  42)r�r*r�r+r�rJs& r�test_get_docstring_none�'ASTHelpers_Test.test_get_docstring_noneHs������#�+�+�C�I�I�b�M�:�;��y�y�.�/�����#�+�+�D�1�2��y�y�-�.�����#�+�+�D�1�2��y�y�-�.�����#�+�+�D�I�I�a�L�9�:��y�y�<�=�����#�+�+�D�I�I�a�L�9�:��y�y�<�=�����#�+�+�D�I�I�a�L�9�:��y�y�-�.�����#�+�+�D�I�I�a�L�9�:��y�y�<�=�����#�+�+�D�I�I�a�L�9�:��y�y�3�4�����#�+�+�D�I�I�a�L�9�:��y�y�B�C�����#�+�+�D�I�I�a�L�9�:��y�y�1�2�����#�+�+�D�I�I�a�L�9�:r c���[OQP
Q5oUOUO]*O]2UOUO]*O
]2UOUO]*O]*O]2UOUO]*O]*O
]2UOUO]*O]*O]*O]2UOUO]*O]*O]*O
]	2UOUO]*O]*O]2UOUO]*O]*O
]2UOUO]*O]2UOUO]*O
]
2P!)z�"""line one
line two"""

def foo():
  """line one
  line two"""

  def bar():
    """line one
    line two"""
  """line one
  line two"""
"""line one
line two"""

r�)r*r+r]r�rYrXrJs& r�:test_multi_line_docstring_col_offset_and_lineno_issue16806�JASTHelpers_Test.test_multi_line_docstring_col_offset_and_lineno_issue16806cs����y�y�
+�
�

��	
������1��0�0�!�4�������1��,�,�a�0�������1��*�*�1�-�8�8�!�<�������1��*�*�1�-�4�4�a�8�������1��*�*�1�-�2�2�1�5�@�@�!�D�������1��*�*�1�-�2�2�1�5�<�<�a�@�������1��*�*�1�-�8�8�!�<�������1��*�*�1�-�4�4�b�9�������1��0�0�!�4�������1��,�,�b�1r c���[OQ2oUO]*O]*oUO	UO
]2UO	UO]2P!)z if a:
    pass
elif b:
    pass
�r*r+r��orelser]rXrY�r;rO�	elif_stmts&  r�test_elif_stmt_start_position�-ASTHelpers_Test.test_elif_stmt_start_positionwsU���y�y�?�@���I�I�a�L�'�'��*�	�����)�)�1�-�����-�-�q�1r c���[OQ2oUO]*O]*oUO	UO
]2UO	UO]2P!)z/if a:
    pass
elif b:
    pass
else:
    pass
r�r�s&  r�'test_elif_stmt_start_position_with_else�7ASTHelpers_Test.test_elif_stmt_start_position_with_else}sU���y�y�P�Q���I�I�a�L�'�'��*�	�����)�)�1�-�����-�-�q�1r c��[OQ2oUO]*OO]*oUOUO]2UOUO]	2P!)z
f(*[0, 1]))r*r+r�rbr>r]r�r�)r;rO�starred_exprs&  r�*test_starred_expr_end_position_within_call�:ASTHelpers_Test.test_starred_expr_end_position_within_call�sZ���y�y��&���y�y��|�)�)�.�.�q�1������0�0�!�4�����4�4�a�8r c�:�UO[OQ2,QN2UO[OQ2Q]*-2UO[OQ2Q2UO[OQ2.Ql2UO[OQ2Q2UO[OQ2[22UO	[
[OQ2UO[OQ	2]2UO[OQ
2]2UO[OQ2Q2UO[OQ2Q
2UO[OQ2Q
2UO[OQ2Q2UO[
[OQ22Q2UO	[
[OQ2UO	[
[OQ2UO	[
[OQ2P!)z	[1, 2, 3]z{"foo": 42}rz(True, False, None)z	{1, 2, 3}zb"hi"shizset()r��6z+6z-6z3.25g
@z+3.25z-3.25z-0.0z++6z+Truez2+3�r�rr�)TFN>r�rr�i����g
�)r]r*r=r�rkr�r)r:s&r�test_literal_eval�!ASTHelpers_Test.test_literal_eval�s�������)�)�+�6�	�B�����)�)�-�8�5�"�+�F�����)�)�*?�@�BU�V�����)�)�+�6�	�B�����)�)�'�2�E�:�����)�)�'�2�C�E�:����*�c�&6�&6��@�����)�)�#�.��2�����)�)�$�/��3�����)�)�$�/��4�����)�)�&�1�4�8�����)�)�'�2�D�9�����)�)�'�2�E�:�����c�.�.�v�6�7��@����*�c�&6�&6��>����*�c�&6�&6��@����*�c�&6�&6��>r c	���[OQ29^tt^2[OQ2UO	[
29^tt^2o[OQ2PPP2UO
Q[WO22UO
Q[UO22PPP2P!)%fhKd9h)%fhP!9h)i�zExceeds the limit z Consider hexadecimal ��3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333��33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333)	r�adjust_int_max_str_digitsr*r=rkr�r�rr�)r;�err_ctxs& r�test_literal_eval_str_int_limit�/ASTHelpers_Test.test_literal_eval_str_int_limit�s���
�
.�
.�t�
4�
4����X�&��"�"�;�/�/�7�� � ��*�0��M�M�.��G�4E�4E�0F�G��M�M�2�C��8I�8I�4J�K�5�
4�/�/��5�
4�
4�s0�4C�C	�+AC�C
�C
�C�C+	�#C+	c�V�UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ	2Q2UO[OQ
2Q2UO[OQ2Q2UO[OQ2Q2UO[OQ
2Q2UO[OQ2Q2UO[[OQ2UO[[OQ2UO[[OQ2UO[[OQ2UO[[OQ2P!)�6jy@z-6jz6.75jy@z-6.75jz3+6jz-3+6jz3-6jz-3-6jz
3.25+6.75jz-3.25+6.75jz
3.25-6.75jz-3.25-6.75jz(3+6j)z-6j+3z-6j+3jz3+-6jz3+(0+6j)z-(3+6j)y��y��y@@y�@y@�y��y
@@y
�@y
@�y
��)r]r*r=rkr�r:s&r�test_literal_eval_complex�)ASTHelpers_Test.test_literal_eval_complex�s�������)�)�$�/��4�����)�)�%�0�#�6�����)�)�'�2�E�:�����)�)�(�3�V�<�����)�)�&�1�4�8�����)�)�'�2�E�:�����)�)�&�1�4�8�����)�)�'�2�E�:�����)�)�,�7��D�����)�)�-�8�+�F�����)�)�,�7��D�����)�)�-�8�+�F�����)�)�(�3�T�:����*�c�&6�&6��@����*�c�&6�&6��A����*�c�&6�&6��@����*�c�&6�&6�
�C����*�c�&6�&6�	�Br c��[O[O]2[O]2,[O]2,Q5oUO[[O
U2[O[O]2,[O]2[O]2,Q5oUO[[O
U2P!)r�)�keysr�)r*�Dictr�rkr�r=)r;�	malformeds& r�&test_literal_eval_malformed_dict_nodes�6ASTHelpers_Test.test_literal_eval_malformed_dict_nodes�s����H�H�3�<�<��?�C�L�L��O�"D�c�l�l�[\�o�M^�_�	����*�c�&6�&6�	�B��H�H�3�<�<��?�"3�S�\�\�!�_�c�l�l�[\�o�<^�_�	����*�c�&6�&6�	�Br c�6�UO[OQ2P2UO[OQ2P2UO[OQ2P2UO[[OQ2P!)z    -1z		-1z 	 -1z
 -1)r]r*r=rk�IndentationErrorr:s&r�test_literal_eval_trailing_ws�-ASTHelpers_Test.test_literal_eval_trailing_ws�sl������)�)�(�3�R�8�����)�)�(�3�R�8�����)�)�(�3�R�8����*�C�,<�,<�g�Fr c	�V�QoUO[U29^tt^2[OQ2PPP2[O[O
2[O[O
2[O]222oUO[UQP22QoUO[U29^tt^2[OU2PPP2P!)%fhK�9h)%fhP!9h)z#malformed node or string on line 3:z{'a': 1,
'b':2,
'c':++3,
'd':4}rXzmalformed node or string:)	rzr�r*r=�UnaryOp�UAddr�r�r[)r;r{rOs&  r�"test_literal_eval_malformed_lineno�2ASTHelpers_Test.test_literal_eval_malformed_lineno�s���4��
�
#�
#�J��
4�
4����A�B�5��{�{��H�H�J����C�H�H�J����Q��@�B�����'�$��$�7�8�*��
�
#�
#�J��
4�
4����T�"�5�
4�5�
4��5�
4�
4�s#�D�#D�D	�
D	�D(	� D(	c��UO[Q29^tt^2[OQ2PPP2P!)%fhP!9h)zunexpected indentz4
                \
                (\
            \ )rzr�r*r=r:s&r�test_literal_eval_syntax_errors�/ASTHelpers_Test.test_literal_eval_syntax_errors�s9��
�
#�
#�K�1D�
E�
E�����
�F�
E�
E�
E�s�A�A	�
A	c�p�[OQ[OQQ5,PPPQ5,o[OU,2oUO	[
29^tt^2o[
UQQ2PPP2UOQ[WO22P!)%fhK79h)�time�sleepr#�r�r��levelrXrYr/r�zinvalid integer value: None)
r*rr�r�rkr�r�r�rr�)r;r�r�r�s&   r�test_bad_integer� ASTHelpers_Test.test_bad_integer�s������f�&)�i�i�W�&=�%>�%)�&*�t�=�>���j�j��r�"��
�
�
�z�
*�
*�b��C���(�+��
�
�3�S����5F�G�+�
*�r�c	��[OQ[OQ]]Q5,P]]Q5,o[OU,2o[	UQQ2o-o[V42UO
QU2P!)r�r�r�r�r/r�)r*rr�r�r�r�r�)r;r�r�r��nss&    r�test_level_as_none�"ASTHelpers_Test.test_level_as_none�ss�����f�&)�i�i�W�78�Q�'H�&I�%)�&'�A�	7�8��
�j�j��r�"���s�F�F�+��
���T���
�
�g�r�"r c	��[O[O2]][O]2Q5oVmUO[29^tt^2[O29^tt^2[[OU2QQ2PPP2PPP2P!)%fhK9h)%fhP!9h�r)rorXrY�operandrr��r*r��Notr�r�rkrhrrir�r�r?s& r�test_recursion_direct�%ASTHelpers_Test.test_recursion_direct�s���
�K�K�3�7�7�9�Q�1�c�l�l�ST�o�V���	�
�
�
�~�
.�
.��+�+�-�-�����q�)�8�V�<�.�/�
.�-�-��/�
.�
.�s0�&C�"B8	�&C�8C
�C
�C�C	�C	c	�L�[O[O2]][O]2Q5o[O[O2]][O]2Q5oV!mVmUO[29^tt^2[O29^tt^2[[OU2QQ2PPP2PPP2P!)%fhK9h)%fhP!9hr�r�)r;r�r�s&  r�test_recursion_indirect�'ASTHelpers_Test.test_recursion_indirect�s���
�K�K�3�7�7�9�Q�1�c�l�l�ST�o�V���K�K�3�7�7�9�Q�1�c�l�l�ST�o�V���	��	�
�
�
�~�
.�
.��+�+�-�-�����q�)�8�V�<�.�/�
.�-�-��/�
.�
.�s0�-D�"C?	�-D�?D
�D
�
D�D#	�D#	)r�)'r>r?r@rAr�r9r@rKrQr]rkrqrzrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
rr�r�rCrDrEs@rr7r7�s������G�3�
:�
�(3"�j>
�@d
�LA�,�"
�&@�0
:�:�	
�F�,;�62�(2�2�9�?�&L�C�*C�G�
#��	H�
#���#�%�=�&��=���#�%�=�&��=r r7c ��
`�\sQsQsnQCQ\-QkksQDQ\-QkksQDQksQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Q s"Q!s#Q"s$Q#s%Q$s&Q%s'Q&s(Q's)Q(s*Q)s+Q*s,Q+s-Q,s.Q-s/Q.s0Q/s1\2OfQ02Q12s4\5Ol]2s7\5Op\72s9\5OlQ22s:\5Op\:2s;\5OlP	2s<\5OzP	2s>\5O~Q3\5O�22sA\5Op\5O�\5O�\5O~Q2\5O�22Q4\5O�22Q5\5O�222\5Op\5O�\5O�\5O~Q2\5O�22Q4\5O�22Q5\5O�222\5Op\5OlQ622\5Op\5OlP	22\5Op\5OlQE22\5OzQ72\5O�\5OzQ72,2\5O�\5O�\5OzQ72,2,2\5O�\7\<,\;,2\5O�\<\7,\;\9,Q8Q95\5O�\<\5O�\5O~Q:\5O�22\5O�22,\;\9,Q;Q95\5O�\5O�\5O�\:Q4\5O�22Q5\5O�22,,,Q<5\5O�\A,Q8,\9,Q<5\5O�\A,,\9,Q<5\5O�\A\5OzQ72,,,Q<5\5O�\A\5O�2,,,Q<5\5O�\A,,\5O�2,Q<5\5O�\<,Q8,\9,Q<5\5O�\5O�Q82,2\5O�Q=Q>5\5O�,2\5O�\9,2\5O�\9\;\5OzQ?2,2\5O�Q@Q>5\5O�Q2Q>5\5O�\5O�Q@2,2\5O�,,Q@Q95,sKQAsLQBsMUsNP!)F�ASTValidatorTestsirTc�D�]9UmUm[OU2Ue[	UQU2P!UOU29^tt^2o[	UQU2PPP2UO
U[WO22P!)%fhK79h)rr)	rXrYr*r�r�rkr�rr�)r;r�r{r�rTr�s&&&&$ rr��ASTValidatorTests.modss��&'�'��
�S�^��!�!�#�&��;��C��4�(��"�"�3�'�'�2���X�t�,�(��M�M�#�s�2�<�<�0�1�(�'�s�B�B	�B	c��[O[OU2,,2oUOVBUQ5P!))rT)r*r�r�r�)r;rOr{rTr�s&&&$ rrU�ASTValidatorTests.exprs-���j�j�#�(�(�4�.�)�2�.������s��#r c�Z�[OU,,2oUOV22P!r")r*r�r�)r;rVr{r�s&&& rrV�ASTValidatorTests.stmts ���j�j�$���$������r c	�v�[O[O[OQ[O222,2oUOUQQ2[O[OQ[O222oUOUQQ2P!)rp�must have Load contextr�r�)r*�Interactiver�r��Storer�r�)r;r�s& rrk�ASTValidatorTests.test_modulesn���O�O�S�X�X�c�h�h�s�C�I�I�K�&@�A�B�C������,�h�7��N�N�3�8�8�C�����5�6������,�f�5r c��`�QU1Qkko[OQ[OQ[O222,oUUUQ5Q2UUUQ5Q2UUUQ5Q2UU[O]2,Q5Q2UU[O]2,Q	5Q
2[OQ[OQ[O
222,oUUU[OQ[O22,Q5Q2[OQ[OQ[O
222[OQ
[OQ[O
222,oUUUP[OQ[O22,Q5Q2P!)Nc	�:�Ue,oUe,oUe,oUe,oUe,o[OVV#VdU2oRU2!r")r*rC)r>r=rmr?rArBr@�facs&&&&&&&�rrC�5ASTValidatorTests._check_arguments.<locals>.argumentss\����|����"� ���!��
������"� ���=�=��F�!,�X�?�D��t�9�r rpr�r�rV)r?)rBz"more positional defaults than args)r@z3length of kwonlyargs is not the same as kw_defaults)r>rBr�r�r
)r?r@)NNNNNNN)r*rDr�r�r�r�)r;r��checkrCr>s&f&  r�_check_arguments�"ASTValidatorTests._check_argumentssX���	� ����S�X�X�c�3�9�9�;�7�8�9��
�i�T�"�$<�=�
�i�D�)�+C�D�
�i�4�(�*B�C�
�i�#�,�,�q�/�!2�3�;�	=�
�i�S�\�\�!�_�$5�6�L�	N�����S�X�X�c�3�8�8�:�6�7�8��
�i�T�S�X�X�c�3�9�9�;�-G�,H�I�/�	1�����S�X�X�c�3�8�8�:�6�7�����S�X�X�c�3�8�8�:�6�7�9��
�i�4�'+�S�X�X�c�3�9�9�;�-G�&H�J�2�	4r c�"�[O,,P,,P,2o[OQU,,PP,2oUOUQ2[OQU[O2,[O
Q[O22,PP,2oUOUQ2[OQU[O2,,[O
Q[O22P,2oUOUQ2[OQ[O2[O2,2oUOU2QoUOV0O2P!)Nrpzempty body on FunctionDefr�c	�d�[OQU[O2,,PP,2!�rp)r*r$r�r�s&rr��+ASTValidatorTests.test_funcdef.<locals>.facKs%���?�?�3��s�x�x�z�l�B��d�B�O�Or )r*rCr$rVr�r�r�r�)r;r�r�r�s&   r�test_funcdef�ASTValidatorTests.test_funcdef@s���M�M�"�b�$��B��b�9���O�O�C��B��D�$��;���	�	�!�0�1��O�O�C��S�X�X�Z�L�3�8�8�C�����3M�2N�PT�VZ�\^�_���	�	�!�-�.��O�O�C��S�X�X�Z�L�"��H�H�S�#�)�)�+�6��b�
B���	�	�!�-�.��O�O�C�����3�8�8�:�,�?���	�	�!��	P����c�9�9�-r c��QoQo[O[OU22oUO]*oUOU[O2UOUU22P!)c��U[OQb9d�vQ6Xc�[OQb9d�vc�]6Hc�v[OQb9d�vQ6Xc�c�]6Hc�v[OQb9d{vcv]6Hcov[O
Qb9dXvQ6XcP[OQb9d;v[O
Qb9d%vQ6Xc[OQb9dvP	!P
!)r#rr�r
r(�pacarana)r*r$rCrDr�r�r�)rOs&r�matcher�@ASTValidatorTests.test_funcdef_pattern_matching.<locals>.matcherQsx����_�_�G�U�C�M�M�,P�?O�?O������%1�\�c�h�h�j�%G�%G�c�h�h�&F�z�3�8�8�:�%(�X�X�%E�j�#�(�(�*��	G�
� r zZ
            @capybara
            def foo(bar) -> pacarana:
                pass
        )r*r+r�rr�r�r$re)r;rr�r��funcdefs&    r�test_funcdef_pattern_matching�/ASTValidatorTests.test_funcdef_pattern_matchingOsY��	!���
���8�?�?�4�0�1���+�+�a�.�����g�s���7������(�)r c�.�Q
QkoUOU[OQ[O22,Q5Q2UOU[OQ[OQ[O222,Q5Q2UOU,Q5Q2UOUP,Q5Q2UOU[OQ[O22,Q	5Q2P!)Nc��Ue,oUe,oUe[O2,oUe,oUe,o[OQVV#U2!)N�myclass)r*r�r\)�basesr�r�rS�type_paramss&&&&&rr7�,ASTValidatorTests.test_classdef.<locals>.clsfs[���}��������|����
�|���%�!#���"� ���<�<�	�5� $�k�C�
Cr rp)r
r�)r�r�zempty body on ClassDef�None disallowed)rS)NNNNN)rVr*r�r�r�)r;r7s& r�
test_classdef�ASTValidatorTests.test_classdefes���	C�	
�	�	�#�S�X�X�c�3�9�9�;�7�8�9�*�	,��	�	�#����C����#�s�y�y�{�1K� L�M�N�*�	,��	�	�#�2�,� 8�9��	�	�#�D�6�"�$5�6��	�	�#�c�h�h�s�C�I�I�K�&@�%A�B�*�	,r c	�@�UO[O,2Q2UO[OP,2Q2UO[O[OQ[O22,2Q2P!)zempty targets on Deleterrpzmust have Del context)rVr*�Deleter�r�r:s&r�test_delete�ASTValidatorTests.test_delete|sa���	�	�#�*�*�R�.�";�<��	�	�#�*�*�d�V�$�&7�8��	�	�#�*�*�c�h�h�s�C�H�H�J�7�8�9�)�	+r c
��UO[O,[O]22Q2UO[OP,[O]22Q2UO[O[OQ[O
22,[O]22Q2UO[O[OQ[O22,[OQ[O222Q2P!)r�zempty targets on Assignrrp�must have Store contextr
r�)rVr*�Assignr�r�r�r�r:s&r�test_assign�ASTValidatorTests.test_assign�s����	�	�#�*�*�R����a��1�3L�M��	�	�#�*�*�d�V�S�\�\�!�_�5�7H�I��	�	�#�*�*�c�h�h�s�C�H�H�J�7�8�#�,�,�q�/�J�+�	-��	�	�#�*�*�c�h�h�s�C�I�I�K�8�9� #����c�i�i�k� :�<�*�	,r c	�<�[O[OQ[O22[O2[OQ[O222oUOUQ2[O[OQ[O22[O2[OQ[O222oUOUQ2P!)rpr
rr�)r*�	AugAssignr�r�rtrVr�)r;�augs& r�test_augassign� ASTValidatorTests.test_augassign�s����m�m�C�H�H�S�#�(�(�*�5�s�w�w�y��H�H�S�#�(�(�*�5�7���	�	�#�0�1��m�m�C�H�H�S�#�)�)�+�6����	��H�H�S�#�)�)�+�6�8���	�	�#�/�0r c
��[OQ[O22o[OQ[O22o[O2oUO[OV,,2Q2UO[O[OQ[O22V#,,2Q2UO[OU[OQ[O22U,,2Q2[O[OQ[O222oUO[OVU,,2Q2UO[OVU,U,2Q2P!)rpr
zempty body on Forrr�)r*r�r�r�r�rVrr�)r;rpr
�pr�s&    r�test_for�ASTValidatorTests.test_for�s���H�H�S�#�)�)�+�&���H�H�S�#�(�(�*�%���H�H�J���	�	�#�'�'�!��B�'�)<�=��	�	�#�'�'�#�(�(�3����
�3�Q��R�@�+�	-��	�	�#�'�'�!�S�X�X�c�3�9�9�;�7�!��b�A�*�	,��H�H�S�X�X�c�3�9�9�;�/�0���	�	�#�'�'�!���R�(�*B�C��	�	�#�'�'�!���a�S�)�+C�Dr c
�b�UO[O[O]2,,2Q2UO[O[OQ[O
22[O2,,2Q2UO[O[O]2[O2,[O[OQ[O
222,2Q2P!)r�zempty body on Whilerpr�)rVr*�Whiler�r�r�r�r�r:s&r�
test_while�ASTValidatorTests.test_while�s����	�	�#�)�)�C�L�L��O�R��4�6K�L��	�	�#�)�)�C�H�H�S�#�)�)�+�6������b�I�*�	,��	�	�#�)�)�C�L�L��O�c�h�h�j�\�!�h�h�s�x�x��S�Y�Y�[�'A�B�C�E�5�	7r c�`�UO[O[O]2,,2Q2[O[OQ[O
22[O2,,2oUOUQ2[O[O]2[O[OQ[O
222,,2oUOUQ2[O[O]2[O2,[O[OQ[O
222,2oUOUQ2P!)r�zempty body on Ifrpr�)rVr*�Ifr�r�r�r�r�)r;r�s& r�test_if�ASTValidatorTests.test_if�s����	�	�#�&�&����a��"�b�1�3E�F��F�F�3�8�8�C�����-����
�|�R�@���	�	�!�-�.��F�F�3�<�<��?�S�X�X�c�h�h�s�C�I�I�K�.H�%I�$J�B�O���	�	�!�-�.��F�F�3�<�<��?�S�X�X�Z�L��H�H�S�X�X�c�3�9�9�;�7�8�9�
;���	�	�!�-�.r c���[O2oUO[O,U,2Q2[O[O
]2P2oUO[OU,,2Q2[O[OQ[O22P2oUO[OU,U,2Q2[O[O
]2[OQ[O222oUO[OU,U,2Q2P!)zempty items on Withzempty body on Withrpr�r)	r*r�rV�Withr�r�r�r�r�)r;r"r�s&  r�	test_with�ASTValidatorTests.test_with�s����H�H�J���	�	�#�(�(�2��s�#�%:�;��L�L����a��$�/���	�	�#�(�(�A�3��#�%9�:��L�L����#�s�y�y�{�3�T�:���	�	�#�(�(�A�3���$�&>�?��L�L����a��#�(�(�3����
�*C�D���	�	�#�(�(�A�3���$�&?�@r c���[OP[O]22oUOUQ2[O[OQ[O
22P2oUOUQ2[O[O]2[OQ[O
222oUOUQ2P!)Nz!Raise with cause but no exceptionrpr�)r*r[r�rVr�r�)r;�rs& r�
test_raise�ASTValidatorTests.test_raise�s����I�I�d�C�L�L��O�,���	�	�!�8�9��I�I�c�h�h�s�C�I�I�K�0�$�7���	�	�!�-�.��I�I�c�l�l�1�o�s�x�x��S�Y�Y�[�'A�B���	�	�!�-�.r c�H�[O2o[O,,,U,2oUOUQ2[O[O[O
Q[O222,,,U,2oUOUQ2[OU,,,,2oUOUQ2[OU,,U,U,2oUOUQ2[OU,[OPQ,2,,,2oUOUQ2[O[O
Q[O22QU,2,oUO[OU,U,,2Q2[OPQU,2,o[OU,U[O[O
Q[O222,U,2oUOUQ2[OU,V1,[O[O
Q[O222,2oUOUQ2P!)zempty body on Tryrpr�z-Try has neither except handlers nor finalbodyz%Try has orelse but no except handlers�empty body on ExceptHandlerr
)r*r��TryrVr�r�r��
ExceptHandler�r;r"�tr�s&   r�test_try�ASTValidatorTests.test_try�s����H�H�J���G�G�B��B���$���	�	�!�(�)��G�G�S�X�X�c�h�h�s�C�I�I�K�8�9�:�B��Q�C�H���	�	�!�-�.��G�G�Q�C��R��$���	�	�!�D�E��G�G�Q�C��a�S�1�#�&���	�	�!�<�=��G�G�Q�C�#�+�+�D�#�r�:�;�R��D���	�	�!�2�3�
�
�
�s�x�x��S�Y�Y�[�9�3���
D�E���	�	�#�'�'�1�#�q�"�b�)�+C�D�
�
�
�t�S�1�#�
.�/���G�G�Q�C��S�X�X�c�h�h�s�C�I�I�K�&@�A�B�Q�C�H���	�	�!�-�.��G�G�Q�C��C�#�(�(�3�8�8�C�����+E�"F�!G�H���	�	�!�-�.r c�H�[O2o[O,,,U,2oUOUQ2[O[O[O
Q[O222,,,U,2oUOUQ2[OU,,,,2oUOUQ2[OU,,U,U,2oUOUQ2[OU,[OPQ,2,,,2oUOUQ2[O[O
Q[O22QU,2,oUO[OU,U,,2Q2[OPQU,2,o[OU,U[O[O
Q[O222,U,2oUOUQ2[OU,V1,[O[O
Q[O222,2oUOUQ2P!)zempty body on TryStarrpr�z1TryStar has neither except handlers nor finalbodyz)TryStar has orelse but no except handlersr6r
)r*r��TryStarrVr�r�r�r8r9s&   r�
test_try_star�ASTValidatorTests.test_try_star�s����H�H�J���K�K��B��Q�C�(���	�	�!�,�-��K�K����#�(�(�3��	�	��"<�=�>��B���L���	�	�!�-�.��K�K���R��R�(���	�	�!�H�I��K�K���R�!��q�c�*���	�	�!�@�A��K�K���c�/�/��c�2�>�?��R�H���	�	�!�2�3�
�
�
�s�x�x��S�Y�Y�[�9�3���
D�E���	�	�#�+�+�q�c�1�b�"�-�/G�H�
�
�
�t�S�1�#�
.�/���K�K���Q����#�(�(�3��	�	��*D�!E� F���L���	�	�!�-�.��K�K���Q��c�h�h�s�x�x��S�Y�Y�[�/I�&J�%K�L���	�	�!�-�.r c	��UO[O[OQ[O22P2Q2[O[OQ[O
22[OQ[O222oUOUQ2P!�rpr�r
)rVr*�Assertr�r�r�)r;�assrts& r�test_assert�ASTValidatorTests.test_assert�ss���	�	�#�*�*�S�X�X�c�3�9�9�;�7��>�*�	,��
�
�3�8�8�C�����4��8�8�C�����5�7���	�	�%�1�2r c�T�UO[O,2Q2P!)zempty names on Import)rVr*r�r:s&r�test_import�ASTValidatorTests.test_import�����	�	�#�*�*�R�.�"9�:r c���[OP[OQP2,Q2oUOUQ2UO[OP,]2Q2P!)NrpzNegative ImportFrom levelzempty names on ImportFromi���)r*rr�rV)r;�imps& r�test_importfrom�!ASTValidatorTests.test_importfrom�sM���n�n�T�C�I�I�c�4�$8�#9�3�?���	�	�#�2�3��	�	�#�.�.��r�1�-�/J�Kr c�T�UO[O,2Q2P!)zempty names on Global)rVr*�Globalr:s&r�test_global�ASTValidatorTests.test_global�rJr c�T�UO[O,2Q2P!)zempty names on Nonlocal)rVr*�Nonlocalr:s&r�
test_nonlocal�ASTValidatorTests.test_nonlocal�s���	�	�#�,�,�r�"�$=�>r c��[O[OQ[O222oUO	UQ2P!�rpr�)r*r�r�r�rVr?s& r�	test_expr�ASTValidatorTests.test_expr	s0���H�H�S�X�X�c�3�9�9�;�/�0���	�	�!�-�.r c	��[O[O2,2oUOUQ2[O[O2[O]2,2oUOUQ2[O[O2[O]2P,2oUOUQ2[O[O2[O]2[O
Q[O22,2oUOUQ2P!)zless than 2 valuesrrpr�)r*�BoolOp�AndrUr�r�r�)r;r�s& r�test_boolop�ASTValidatorTests.test_boolop	s����J�J�s�w�w�y�"�%���	�	�!�)�*��J�J�s�w�w�y�3�<�<��?�"3�4���	�	�!�)�*��J�J�s�w�w�y�3�<�<��?�D�"9�:���	�	�!�&�'��J�J�s�w�w�y�3�<�<��?�C�H�H�S�#�)�)�+�4N�"O�P���	�	�!�-�.r c���[O[O2[OQ[O222oUOUQ2P!rX)r*r�r�r�r�rU)r;�us& r�test_unaryop�ASTValidatorTests.test_unaryop	s8���K�K����	�3�8�8�C�����#=�>���	�	�!�-�.r c
��[O,,P,,P,2oUO[OU[OQ[O
222Q2QoUO
V O2P!)Nrpr�c��[OU[OQ[O222!r�)r*�Lambdar�r�r�s&rr��*ASTValidatorTests.test_lambda.<locals>.fac	s$���:�:�d�C�H�H�S�#�(�(�*�$=�>�>r )r*rCrUrfr�r�r�)r;r�r�s&  r�test_lambda�ASTValidatorTests.test_lambda	s`���M�M�"�b�$��B��b�9���	�	�#�*�*�Q�����c�i�i�k� :�;�*�	,�	?����c�9�9�-r c� �[OQ[O22o[OQ[O22oV!U1VU1VU11FD(oUO	[O
UQ2J*	P!�rpr
r�)r*r�r�r�rU�IfExp)r;�l�sr>s&   r�
test_ifexp�ASTValidatorTests.test_ifexp	sc���H�H�S�#�(�(�*�%���H�H�S�#�)�)�+�&���1�I��a�y�1��)�3�D��I�I�c�i�i��&�(@�A�4r c�R�[O,[OQ[O22,2oUO	UQ2[O[OQ[O22,P,2oUO	UQ2P!)rpzsame number of keys as valuesr)r*r�r�r�rU)r;r�s& r�	test_dict�ASTValidatorTests.test_dict!	sj���H�H�R�#�(�(�3����
�3�4�5���	�	�!�4�5��H�H�c�h�h�s�C�H�H�J�/�0�4�&�9���	�	�!�&�'r c��UO[OP,2Q2[O[OQ[O22,2oUOUQ2P!�Nrrpr�)rUr*�Setr�r��r;rns& r�test_set�ASTValidatorTests.test_set'	sL���	�	�#�'�'�4�&�/�#4�5��G�G�S�X�X�c�3�9�9�;�/�0�1���	�	�!�-�.r c	��UOU,2Q2[O[OQ[O22[OQ[O22,]2oUOUU,2Q2[O[OQ[O
22[OQ[O
22,]2oUOUU,2Q2[OQ[O
22o[OQ[O22o[OV4P,]2oUOUU,2Q2[OV4[OQ[O
22,]2oUOUU,2Q2P!)z comprehension with no generatorsrprr�r
r)rUr*rr�r�r�)r;r��grpr
s&&   r�_check_comprehension�&ASTValidatorTests._check_comprehension,	sK���	�	�#�b�'�=�>����c�h�h�s�C�H�H�J�7�!�h�h�s�C�H�H�J�7��Q�
@���	�	�#�q�c�(�5�6����c�h�h�s�C�I�I�K�8�!�h�h�s�C�I�I�K�8�"�a�
A���	�	�#�q�c�(�4�5��H�H�S�#�)�)�+�&���H�H�S�#�(�(�*�%�����a�T�F�A�.���	�	�#�q�c�(�-�.����a�S�X�X�c�3�9�9�;�%?�$@�!�D���	�	�#�q�c�(�4�5r c	�`�[O[OQ[O22[OQ[O22,]2oUOR[OQ[O22U,2Q2U1QkoUO
U2P!)rpr�c�h:�R[OQ[O22U2!r�)r*r�r�)�gensr�s&�r�wrap�,ASTValidatorTests._simple_comp.<locals>.wrap@	s!����s�x�x��S�Y�Y�[�1�4�8�8r )r*rr�r�r�rUr|)r;r�r{r�s&f  r�_simple_comp�ASTValidatorTests._simple_comp;	s}������c�h�h�s�C�I�I�K�8�!�h�h�s�C�H�H�J�7��Q�
@���	�	�#�c�h�h�s�C�I�I�K�0�1�#�6�*�	,�	9��!�!�$�'r c�F�UO[O2P!r")r�r*�ListCompr:s&r�
test_listcomp�ASTValidatorTests.test_listcompD	s�����#�,�,�'r c�F�UO[O2P!r")r�r*�SetCompr:s&r�test_setcomp�ASTValidatorTests.test_setcompG	s�����#�+�+�&r c�F�UO[O2P!r")r�r*�GeneratorExpr:s&r�test_generatorexp�#ASTValidatorTests.test_generatorexpJ	s�����#�*�*�+r c���[O[OQ[O22[OQ[O22,]2o[O
[OQ[O22[OQ[O22U,2oUO
UQ2[O
[OQ[O22[OQ[O22U,2oUO
UQ2QoUOU2P!)r
r"rpr�c���[OQ[O22o[OQ[O22o[OVU2!r)r*r�r��DictComp)�comps�k�vs&  r�factory�0ASTValidatorTests.test_dictcomp.<locals>.factoryV	s?������c�h�h�j�)�A�����c�h�h�j�)�A��<�<��e�,�,r )r*rr�r�r�r�rUr|)r;r{�cr�s&   r�
test_dictcomp�ASTValidatorTests.test_dictcompM	s������c�h�h�s�C�I�I�K�8�!�h�h�s�C�H�H�J�7��Q�
@���L�L����#�s�y�y�{�3����#�s�x�x�z�2�Q�C�
9���	�	�!�-�.��L�L����#�s�x�x�z�2����#�s�y�y�{�3�a�S�
:���	�	�!�-�.�	-�	
�!�!�'�*r c	�@�UO[O[OQ[O222Q2UO[O
[OQ[O222Q2P!)rpzmust have Load)rUr*�Yieldr�r��	YieldFromr:s&r�
test_yield�ASTValidatorTests.test_yield\	sT���	�	�#�)�)�C�H�H�S�#�)�)�+�6�7�9I�J��	�	�#�-�-�����c�i�i�k� :�;�=M�Nr c���[OQ[O22o[OU[O2,,2oUOUQ2[OU[O2,[O]2[O]2,2oUOUQ2[O[OQ2[O2,U,2oUOU2[OU[O2,[OQ2,2oUOU2P!)rpzno comparatorsz,different number of comparators and operands�blah)r*r�r��Compare�InrUr�)r;rn�comps&  r�test_compare�ASTValidatorTests.test_compare`	s����x�x��S�X�X�Z�(���{�{�4�#�&�&�(��R�0���	�	�$�(�)��{�{�4�#�&�&�(��c�l�l�1�o�s�|�|�A��-O�P���	�	�$�F�G��{�{�3�<�<��/�#�&�&�(��d�V�D���	�	�$���{�{�4�#�&�&�(��c�l�l�6�.B�-C�D���	�	�$�r c��[OQ[O22o[OQ[O22,o[OQ[OQ[O222,o[O[OQ[O
22V#2oUO
UQ2[OUP,U2oUO
UQ2[OQ[OQ[O
222,o[OVU2oUO
UQ2P!)rpr
�wrr�r)r*r�r�r�rwr�rU)r;rur>r��call�bad_keywordss&     r�	test_call�ASTValidatorTests.test_callk	s����x�x��S�X�X�Z�(������c�h�h�j�)�*���K�K��S�X�X�c�3�8�8�:�%>�?�@���x�x�����c�i�i�k�2�D�C���	�	�$�0�1��x�x��t�f�h�/���	�	�$�)�*����C����#�s�y�y�{�)C�D�E���x�x��L�1���	�	�$�0�1r c���[O[OQ[O22Q[O22oUOUQ2P!rk)r*�	Attributer�r�r�rU)r;r�s& r�test_attribute� ASTValidatorTests.test_attributew	s:���}�}�S�X�X�c�3�9�9�;�7��c�h�h�j�I���	�	�$�0�1r c
���[O[OQ[O22[O]2[O
22oUO
UQ2[OQ[O
22o[OU[OQ[O22[O
22oUO
UQ2[OQ[O22oUPP1PUP1PPU11FDRo[OUoUO
[OV%[O
22Q2JT	[O,[O
22oUO
[OV%[O
222[OU,[O
22oUO
[OV%[O
22Q2P!rB)	r*�	Subscriptr�r�r�r�rU�Slice�Tuple)r;r-rprnr>�sls&     r�test_subscript� ASTValidatorTests.test_subscript{	sm���m�m�C�H�H�S�#�)�)�+�6����Q���H�H�J�(���	�	�#�/�0��H�H�S�#�(�(�*�%���m�m�A�s�x�x��S�Y�Y�[�9��H�H�J�(���	�	�#�/�0��H�H�S�#�)�)�+�&����d�O�d�A�t�_�t�T�1�o�E�D����D�!�B��I�I�c�m�m�A�3�8�8�:�6�.�
0�F��Y�Y�r�3�8�8�:�
&���	�	�#�-�-��s�x�x�z�2�3�
�Y�Y��s�C�H�H�J�
'���	�	�#�-�-��s�x�x�z�2�4L�Mr c	�z�[O[O[OQ[O22[O
22,[O
22o[OU,[O]22oUOUQ2P!)rpr)	r*�List�Starredr�r�r�rr�rV)r;rn�assigns&  r�test_starred�ASTValidatorTests.test_starred�	si���x�x����S�X�X�c�3�8�8�:�%>��	�	��L�M��	�	��%�����T�F�C�L�L��O�4���	�	�&�3�4r c	��UOUP,[O22Q2UOU[OQ[O22,[O22Q2P!ru)rUr*r�r�r�)r;r�s&&r�	_sequence�ASTValidatorTests._sequence�	sR���	�	�#�t�f�c�h�h�j�)�+<�=��	�	�#�s�x�x��S�Y�Y�[�1�2�C�H�H�J�?�*�	,r c�F�UO[O2P!r")r�r*r�r:s&r�	test_list�ASTValidatorTests.test_list�	s�����s�x�x� r c�F�UO[O2P!r")r�r*r�r:s&r�
test_tuple�ASTValidatorTests.test_tuple�	s�����s�y�y�!r �cpuc�"�[FD�oUOU29^tt^2[OO	[
U2o[
UQQQ59^tt^2oUO2oPPP2[OWUP
Q5o[VRQ2[OVBP
Q5oUO[OVV22PPP2J�	P!)%fhK�9h)%fhCJ9h)r2zutf-8)�encodingr�r�)
�STDLIB_FILESr��os�pathr.�STDLIBr�r�r*r+r�rer�)r;r��fn�fpr�r��mod2s&      r�test_stdlib_validates�'ASTValidatorTests.test_stdlib_validates�	s���"�l�F����f�%�%��W�W�\�\�&�&�1���"�c�G�4�4���W�W�Y�F�5��i�i���U�;�����(��y�y��e�<��������C� 6�7�&�%�#�5�4��&�%�%�s0�;C<	� C)
�1A*C<	�)C9�2C9�4C<	�<D
�D
rp�carterr
r.�stringr7)�rest�lol�legit)�patterns�	kwd_attrs�kwd_patternsr:r#�xxxrc��[OQ[O22oUOFD�oUO	[O
U]Q529^tt^2[OU[OU[O2,Q5,Q5o[OU2o[OU,,2oUO[29^tt^2[UQQ2PPP2PPP2J�	P!)%fhK9h)%fhCJ
9h)rprN)r�r�)�subjectr�rr�)r*r�r��_MATCH_PATTERNSr�r��Matchr�r�r�r�rkr�r�)r;�name_xr�rOr�s&    r�test_match_validation_pattern�/ASTValidatorTests.test_match_validation_pattern/
s������#�s�x�x�z�*���+�+�G����c�h�h�w�q�9�:�:��y�y�"����$+�$'�H�H�J�<������0�0��6�����T�F�B�/���&�&�z�2�2��F�H�f�5�3�;�:�,�3�2��;�:�:�s1�+BD1	�:D
�D1	�D.�'D.�)D1	�1E
�:E
r#)Nr�r"r�)Or>r?r@rAr�r�rUrVrkr�rrrrrrr#r'r+r/r3r;r?rErHrMrQrUrYr^rbrhrorrrxr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�requires_resourcer�r*r��
constant_1�
MatchValue�	pattern_1�
constant_x�	pattern_x�
constant_truerj�pattern_truer�r��name_carterr�r��
MatchSequence�MatchMappingr��
MatchClass�	MatchStar�MatchAs�MatchOrr�r�rCrDrEs@rr�r�sH����2�Z�2�$�*�$��6� 4�D
.�*�,,�.+�,�1�E�7�/�A�/�/�(/�(3�;�L�
;�?�/�/�/�.�B�(�/�

6�(�(�'�,�
+�O�	�
2�2�N�$5�,�
!�"�
���u�%�	8�&�	8����a��J����z�*�I����c�"�J����z�*�I��L�L��&�M��%�%�d�+�L��(�(�8�S�X�X�Z�0�K�	����M�M��
�
��H�H�S�#�)�)�+�.��������S�X�X�Z�
�	
�	����M�M��
�
��H�H�S�#�(�(�*�-��������S�X�X�Z�
�	
�	����L�L���	
�	����L�L���	
�	����L�L��!�	
�	���8�$����

�
�
�X�
&�
�	�	����!�!��*�*�8�4���
�	
�	���
��'�
�K�	
�	���
�J�'�
�	�"��	
�
	���
�C�K�K��������
�(C�S�X�X�Z�P�Q�
�	�"��	
�
	����M�M��
�
�������%��S�X�X�Z�	
!�
�2�B�
	
�	������h�#��		
�	������#��		
�	�����(�(��2�3���		
�	�����m�m�o�&���		
�	�������-�-�/�*�		
�	������h�#��		
�	����
�
�f�%�
�	
�
	����	
�	����	
�	���
�K�	
�	���
�	�3�#5�#5�e�#<�=�	
�	������
�
�3�����3�=�=��-�.�/�����R�c�*�ox�O�t6�6r r�c�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	s\OQ
2sQsQsQ
sUsP!)�
ConstantTestsiB
z$Tests on the ast.Constant node type.c�8�[OQ2oUO]*Oo[OUQ5o[O
VC2VBO]*m[
UQQ2o-o[VV2UQ*!)zx = 123rOr�r�rp)r*r+r�rbr�rvr�r�)r;rbr�rO�new_noder�r�s&&     r�compile_constant�ConstantTests.compile_constantE
sp���y�y��#���y�y��|�!�!���<�<�e�,�����(�)�%�	�	�!����t�Z��0��
���T���#�w�r c���UO[29^tt^2oUO,QN2PPP2UO[	WO
2Q2P!)%fhK79h)r�z%got an invalid type in Constant: listr�)rkrnr�r]rr�)r;r�s& r�test_validation�ConstantTests.test_validationS
sN��
�
�
�y�
)�
)�R��!�!�)�,�*�����R�\�\�*�@�	B�*�
)�s�A"�"A2	�+A2	c	���PP
P	[Q1FDHoUOUQ59^tt^2UOU2oUOV!2PPP2JJ	P!)%fhJ_9h)Nr )�const)�Ellipsisr�r�r)r;r�rbs&  r�test_singletons�ConstantTests.test_singletonsY
sV���E�4��3�7�E����E��*�*��-�-�e�4���
�
�e�+�+�*�8�*�*�*�s�#A	�A-
�%A-
c	�j�Qo[].2o[]2FDoU]1o[U].2oJ	]{QQQQ[Q2[Q2V1	oSFDHoUOUQ59^tt^2UO	U2oUOVe2PPP2JJ	P!)%fhJ_9h)	r�g�^@y�^@�unicode�bytesrr�rOrF)r�rErr�r�r])r;�nested_tuple�nested_frozensetr�r�rb�results&      r�test_values�ConstantTests.test_values_
s�����$�a�S�>���1�X�E�(�!�,�L�(�*:�A�)>�?����u�d��X���.�)�K�"8��2���E����E��*�*��.�.�u�5��� � ��/�+�*��*�*�*�s�0#B!	�!B2
�*B2
c���[OQ2oUO]*O]*o[O]Q5o[O
V22V1O]*O]$UO
[29^tt^2o[UQQ2PPP2UO[WO2Q2P!)%fhK79h)rnrOr�r�z6expression which can't be assigned to in Store context)r*r+r��targetsr�rvrkr�r�r]rr�)r;r�r��
new_targetr�s&    r�test_assign_to_constant�%ConstantTests.test_assign_to_constantn
s����y�y��!�����1��%�%�a�(���\�\��*�
����*�-�",�	�	�!����Q��
�
�
�z�
*�
*�b��D�(�F�+�+�����R�\�\�*�/�	0�+�
*�s�%C"�"C2	�+C2	c��[OQP
Q5oUO[OU2Q2P!)z'docstring'
x = 1r��	docstring)r*r+r]r�r�s& rr�� ConstantTests.test_get_docstring|
s.���y�y�-��>������*�*�4�0�+�>r c��[UQQ2o,o[OU2FDPoUO[O7fUO
Q6XfJ5UO
UO2JR	U!)r�r��LOAD_COMMON_CONSTANT)r��dis�get_instructions�opcode�hasconst�opnamer}�argval)r;r��co�consts�instrs&&   r�get_load_const�ConstantTests.get_load_const�
s`���T�:�v�
.�����)�)�"�-�E��|�|�s�|�|�+��L�L�$:�:��
�
�e�l�l�+�.��
r c	��,QNoQOSTt,tFDoQOU2MJ	to2oUQ*
oUO[P12[O
U2oUO
UOU2U2[UOU2FD}vqR[U[O2%fP[OU22g[OUQ5o[OVeO2VemJ	UO
UOU2U2P!ttoh)Nr(zx={!r}z
x = ...rO)	NTF��g@y@rrr�)r.r�extendr�r*r+r]rr�r�rKrr�r�rvrb)r;rr�r�r�r�r�s&      r�test_load_const�ConstantTests.test_load_const�
s�����y�y�f�E�f�U�(�/�/�%�0�f�E�F�������
�
�x��&�'��y�y��������,�,�T�2��	!�!����F�3�M�F��f�c�j�j�1�1�C�3�8�8�F�3C�C�1��|�|�%�0�H����h���5�#�L�	4�	
����,�,�T�2��	!��Fs�E	c��[OQ2oUO]*Oo[O]
Q5o[O
V2O2V2m[OQQ5o[O
VBO2VBmUO[OU2Q2P!)z1 + 2rOy4@y$@4@)
r*r+r�rbr�rvrnrpr]r=)r;r��binop�new_left�	new_rights&    rr��ConstantTests.test_literal_eval�
s����y�y��!���	�	�!��"�"���<�<�b�)�����(�J�J�/��
��L�L�s�+�	����)�[�[�1�������)�)�%�0�&�9r c���[OQQQ5OoUOUOQ2UOUO
P2[OQQQ5OoUOUOQ2UOUO
Q2[OQQQ5OoUOUOQ2UOUO
P2[OQQQ5OoUOUOQ2UOUO
P2P!)	z"x"r�r�rpzu"x"razr"x"zb"x"�x)r*r+r�r]rbr�)r;r�s& r�test_string_kind�ConstantTests.test_string_kind�
s����I�I�e�&�)�.�.��������#�&��������&��I�I�f�6�*�/�/��������#�&��������%��I�I�f�6�*�/�/��������#�&��������&��I�I�f�6�*�/�/��������$�'��������&r r#)r>r?r@rAr�r�r�r�rrr�rrrBr!r�r*rCrDrEs@rr�r�B
sU����.��B�,�
0�0�?�	�
���!��!�8:�'�'r r�c��`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!Q s"Q!s#Q"s$Us%P!)#�EndPositionTestsi�
z�Tests for end position of AST nodes.

Testing end positions of nodes requires a bit of extra care
because of how LL parsers work.
c�x�UOUOU2UOUOU2P!r")r]r�r�)r;r_r�r�s&&&&r�_check_end_pos�EndPositionTests._check_end_pos�
s.������,�,�j�9�����0�0�.�Ar c�T�UO[OV2U2P!r")r]r*�get_source_segment)r;r�r_�contents&&&&r�_check_content�EndPositionTests._check_content�
s������/�/��A�7�Kr c�f�[OU2O]*O!)r)r*r+r�rbrws&&r�_parse_value�EndPositionTests._parse_value�
s#���y�y��|� � ��#�)�)�)r c��QoUOU2oUOVOQ2UOVOO]*Q2UOVOOQ2P!)zlambda x, *y: Noner;rpr
)r7r4r�r>rm)r;rn�lams&  rrh�EndPositionTests.test_lambda�
s`�� ������"�����A�x�x��0����A�x�x�}�}�Q�/��5����A�x�x����4r c�h�[Q2O2o[OU2O]*oUOU]]2UO
VO]*Q2UO
VOO]*Q2UO
VOO]*OQ2UO
VOOQ2UO
VOOOQ2P!)z�
            def func(x: int,
                     *args: str,
                     z: float = 0,
                     **kwargs: Any) -> bool:
                return True
            zreturn Truezx: intr1zkwargs: Any�Any)
rrr*r+r�r/r4r>�
annotationrA�r;rn�fdefs&  r�
test_func_def�EndPositionTests.test_func_def�
s�����
����
	
��y�y��|� � ��#�����D�!�R�(����A�y�y��|�]�;����A�y�y�~�~�a�0�(�;����A�y�y�~�~�a�0�;�;�U�C����A�y�y���
�>����A�y�y���9�9�5�Ar c��QoUOU2oUOVOQ2UOVO]*OQ2UOVO]*OQ2P!)zfunc(x, y=2, **kw)ru�2�kw)r7r4rur�rb�r;rnr�s&  rr��EndPositionTests.test_call�
si�� ��� � ��#�����A�y�y�&�1����A�}�}�Q�/�5�5�s�;����A�}�}�Q�/�5�5�t�<r c��QoUOU2oUOVOQ2UOU]]2P!)zx[0]()zx[0])r7r4rur/rFs&  r�test_call_noargs�!EndPositionTests.test_call_noargs�
s=����� � ��#�����A�y�y�&�1����D�!�Q�'r c�:�[Q2O2o[OU2O]*oUOU]]2UO
VO]*Q2UO
VO]*Q2P!)z?
            class C(A, B):
                x: int = 0
        �Bz
x: int = 0)rrr*r+r�r/r4r
�r;rn�cdefs&  r�test_class_def�EndPositionTests.test_class_def�
sy����

��U�W�	
��y�y��|� � ��#�����D�!�R�(����A�z�z�!�}�c�2����A�y�y��|�\�:r c��Qo[OU2O]*oUOVO]*O
Q2P!)z$class S(metaclass=abc.ABCMeta): passzabc.ABCMeta)r*r+r�r4r�rbrMs&  r�
test_class_kw�EndPositionTests.test_class_kws>��2���y�y��|� � ��#�����A�}�}�Q�/�5�5�}�Er c���[Q2O2o[OU2O]*oUOU]](2UOUO]](2P!)zh
            x = """Some multi-line text.

            It goes on starting from same indent."""
        �rrr*r+r�r/rb�r;rnr�s&  r�test_multi_line_str�$EndPositionTests.test_multi_line_str
s_����

��U�W�		
�
���1��"�"�1�%�����F�A�r�*����F�L�L�!�R�0r c���[Q2O2o[OU2O]*oUOU]]
2UOUO]]
2P!)zB
            x = "first part" \
            "second part"
        rUrVs&  r�test_continued_str�#EndPositionTests.test_continued_strs_����

��U�W�	
����1��"�"�1�%�����F�A�r�*����F�L�L�!�R�0r c��[Q2O2o[OU2oUO]*oUO]*oUO]*oUO]*oUO]*oUOU]]2UOU]	]2UOU]]2UOU]]2UOU]]2UO
VOQ2UO
VO]*Q2UO
VO]*OQ2UO
VOQ2UO
VO]*Q2UO
VO]*OQ2P!)a
            while True:
                pass

            if one():
                x = None
            elif other():
                y = None
            else:
                z = None

            for x, y in stuff:
                assert True

            try:
                raise RuntimeError
            except TypeError as e:
                pass

            pass
        r7zx = Nonezother()�x, yzraise RuntimeErrorrn)rrr*r+r�r/r4r/r�r��handlersrL)r;rnr��
while_loop�if_stmt�for_loop�try_stmtr�s&       r�test_suites�EndPositionTests.test_suites sc��
��

�(�U�W�)	
�*�i�i��l���X�X�a�[�
��(�(�1�+���8�8�A�;���8�8�A�;���H�H�Q�K�	����J��1�-����G�Q��+����H�b�"�-����H�b�!�,����I�r�1�-����A����7����A�|�|�A��
�;����A�~�~�a�0�5�5�y�A����A����7����A�}�}�Q�/�1E�F����A�0�0��3�8�8�+�Fr c��QoUOU2oUO]*OoUOVQ2P!)zx = f"abc {x + y} abc"zx + y)r7r�rbr4�r;rn�fstrr$s&   r�test_fstring�EndPositionTests.test_fstringLs:��$��� � ��#�����A��$�$�����A�g�.r c�,�[Q2O2oUOU2oUO]*OoUOU]]2UO
VOQ2UO
VOQ2P!)z�
            f"""Some multi-line text.
            {
            arg_one
            +
            arg_two
            }
            It goes on..."""
        �arg_one�arg_two)	rrr7r�rbr/r4rnrprfs&   r�test_fstring_multi_line�(EndPositionTests.test_fstring_multi_lineRs|����

��U�W�	
�� � ��#�����A��$�$�����E�1�a�(����A�z�z�9�5����A�{�{�I�6r c��[Q2O2o[OU2O]*oUOU]]2UOUO]*]]2P!)zT
            from x.y.z import (
                a, b, c as c
            )
        )rrr*r+r�r/r�)r;rnrLs&  r�test_import_from_multi_line�,EndPositionTests.test_import_from_multi_linebsc����

��U�W�		
�
�i�i��l����"�����C��A�&����C�I�I�a�L�!�R�0r c��QoQo[Q2O2o[UOVU12vqEoUO	VO
Q2UO	VO
OQ2UO	V%OOQ2UO	V%OOQ2UO	V6OO]*OQ2UO	V6OO]*OQ2UOU]]2P!)	z
f()[1, 2] [0]zx[ a.b: c.d]zN
            x[ a.b: f () ,
               g () : c.d
              ]
        z	f()[1, 2]z1, 2za.bzc.d�f ()�g ())rr�mapr7r4rbr�r�r��eltsr/)r;�s1�s2�sm�i1�i2rs&      r�test_slices�EndPositionTests.test_slicesls���
��
��
��
��U�W�		�
��*�*�R�R�L�9�
������B���+�6����B������7����B������6����B������6����B���
�
�a� 0� 6� 6��?����B���
�
�a� 0� 6� 6��?����B��1�%r c�>�[Q2O2oUOU2oUOU]]2UO	VO
Q2UO	VOQ2UO	VOO
Q2P!)zF
            (1 * 2 + (3 ) +
                 4
            )
        �4z1 * 2 + (3 )�3)rrr7r/r4rprn)r;rnr$s&  r�
test_binop�EndPositionTests.test_binop}s�����

��U�W�		
�
�!�!�!�$�����E�1�a�(����A�{�{�C�0����A�z�z�>�:����A�z�z�/�/��5r c��[Q2O2o[OU2O]*O
oUO
U]],2UOVO]*Q2P!)z{
            if (one_condition and
                    (other_condition or yet_another_one)):
                pass
        z"other_condition or yet_another_one)	rrr*r+r�r/r/r4r�)r;rn�bops&  rr^�EndPositionTests.test_boolop�sk����

��U�W�		
�
�i�i��l����"�'�'�����C��B�'����A�z�z�!�}�@�	Br c��QoQoQo[Q2O2o[UOVV412vqVqxUO	VQ2UO	V&Q2UO	V7Q2UOU]]2P!)zx = () ;z	x = 1 , ;zx = (1 , 2 ) ;z?
            x = (
                a, b,
            )
        rsz1 ,z(1 , 2 ))rrrur7r4r/)	r;rwrx�s3ry�t1�t2�t3�tms	&        r�test_tuples�EndPositionTests.test_tuples�s���
��
��
��
��
��U�W�		�
�T�.�.���0@�A�������B�D�)����B�E�*����B�J�/����B��1�%r c��QoUOU2oUOVU2UOVO]*Q2P!)z
func(x. y .z)zx. y .z)r7r4r>rFs&  r�test_attribute_spaces�&EndPositionTests.test_attribute_spaces�s?����� � ��#�����A�Q�'����A�y�y��|�Y�7r c���Qo[OU2O]*OoUO	[U2OQ2UOVQ2QU*o[OU2O]*OOoUO	[U2OQ2UOV2Q2P!)z( ( ( a + b ) ) )rsza + b�await )r*r+r�rbr]rLr>r4)r;rnr�rxs&   r�test_redundant_parenthesis�+EndPositionTests.test_redundant_parenthesis�s������I�I�a�L���a� �&�&������a��)�)�7�3����A�'�*�
��\���I�I�b�M���q�!�'�'�-�-������a��)�)�7�3����B�7�+r c	�\�QoSFCDvq#UOU29^tt^2[OU2O]*OoUO[
U2OU2UOV$U2QU*o[OU2O]*OOoUO[
U2OU2UOVTU2PPP2CJ	P!)%fhCJ$9h)�( ( ( a ) ) ) ( )r�))r�rw)z( ( ( a ) ) ) ( b )rw)z( ( ( a ) ) ) [ b ]r�)z( ( ( a ) ) ) . br�)	r�r*r+r�rbr]rLr>r4)r;r�rnr:r�rxs&     r�(test_trailers_with_redundant_parenthesis�9EndPositionTests.test_trailers_with_redundant_parenthesis�s���
���D�A����a����I�I�a�L�%�%�a�(�.�.��� � ��a��!1�!1�1�5��#�#�A�!�,���\���I�I�b�M�&�&�q�)�/�/�5�5��� � ��a��!1�!1�1�5��#�#�B�1�-�!��� ���s�C$D	�D+
�"D+
c��QoQoUOU2oUOU2oUOVO]*Q2UOVO]*Q2UOVO]*Q2UOV$O]*Q2UOV$O]*Q2P!)z[{}, {1, }, {1, 2,} ]z{a: b, f (): g () ,}z{}z{1, }z{1, 2,}rsrt)r7r4rvr�r�)r;rwrx�c1�c2s&    r�
test_displays�EndPositionTests.test_displays�s���
$��
#��
�
�
�r�
"��
�
�
�r�
"�����B����
�D�1����B����
�G�4����B����
�I�6����B����
�F�3����B�	�	�!��f�5r c�4�[Q2O2oUOU2oUOU]]%2UO	VO
]*OQ2UO	VOO
]*OQ2UO	VOO
]*O]*Q2UO	VOO
]*OQ2P!)za
            x = [{x for x, y in stuff
                  if cond.x} for stuff in things]
        �things�stuffzcond.xr])
rrr7r/r4�
generatorsr��elt�ifsr�)r;rn�cmps&  r�test_comprehensions�$EndPositionTests.test_comprehensions�s�����

��U�W�	
�����"�����C��B�'����A�~�~�a�0�5�5�x�@����A�w�w�1�1�!�4�9�9�7�C����A�w�w�1�1�!�4�8�8��;�X�F����A�w�w�1�1�!�4�;�;�V�Dr c�<�[Q2O2o[OU2O]*oUOVO]*OQ2UOVO]*OQ2P!)zT
            async def f():
                yield x
                await y
        zyield xzawait y)rrr*r+r�r4rbr?s&  r�test_yield_await�!EndPositionTests.test_yield_await�ss����

��U�W�		
�
�y�y��|� � ��#�����A�y�y��|�1�1�9�=����A�y�y��|�1�1�9�=r c���[Q2O2o[Q2O2oUOU2oUO[O
VO2U2P!)zD
            x = (
                a, b,
            ) + ()
        z;
            (
                a, b,
            )
        )rrr7r]r*r2rn)r;�s_orig�s_tupler$s&   r�test_source_segment_multi�*EndPositionTests.test_source_segment_multi�sk����
��U�W�		�
��
��U�W�		�
�!�!�&�)������/�/��
�
�C�W�Mr c��[Q2O2oQo[OU2O]*oUO[OVO]*P	Q5U2P!)uf
            class C:
                def fun(self) -> None:
                    "ЖЖЖЖЖ"
        u/    def fun(self) -> None:
        "ЖЖЖЖЖ"��padded�rrr*r+r�r]r2)r;r��s_methodrNs&   r�test_source_segment_padded�+EndPositionTests.test_source_segment_padded�se����
��U�W�		�
*���y�y�� �%�%�a�(������/�/��	�	�!��T�R�!�	#r c��Qo[OU2Ovq#qEoUOVQ2UOVQ2UOVQ2UOVQ2UOVQ2P!)z!v = 1
w = 1
x = 1

y = 1
z = 1
zv = 1zw = 1rnzy = 1zz = 1)r*r+r�r4)r;rnr�r�rpr
rs&      r�test_source_segment_endings�,EndPositionTests.test_source_segment_endings�sp��7���	�	�!��)�)�
��a�A����A�'�*����A�'�*����A�'�*����A�'�*����A�'�*r c��[Q2O2oQo[OU2O]*oUO[OVO]*P	Q5U2P!)zb
            class C:
              	  def fun(self) -> None:
              	      pass
        z+  	  def fun(self) -> None:
  	      passr�r�)r;rnr�rNs&   r�test_source_segment_tabs�)EndPositionTests.test_source_segment_tabssc����

��U�W�		
�
&���y�y��|� � ��#������/�/��9�9�Q�<��M�x�Xr c�P�Qo[OU2Ovq#oUOVQ2UOVQ2UOVQ2Qo[OU2O]*oUOVUO	22P!)z3def f():
  pass
def g():
  pass
def h():
  pass
zdef f():
  passzdef g():
  passzdef h():
  passz"def f():
  a = 1
  b = 2
  c = 3
)r*r+r�r4�rstrip)r;rnr�r{�hs&    r�test_source_segment_newlines�-EndPositionTests.test_source_segment_newliness���J���)�)�A�,�#�#���a����A�"4�5����A�"4�5����A�"6�7�5���I�I�a�L���a� �����A�!�(�(�*�-r c��Qo[OU2Ovq#qEU;U;U;U;UO[OV22UO[OV22UO[OV22UO[OV22P!)zv = 1
w = 1
x = 1

y = 1
)	r*r+r�rXr�rYr�r�r2)r;rnr�r�rpr
s&     r� test_source_segment_missing_info�1EndPositionTests.test_source_segment_missing_infos���0���Y�Y�q�\�&�&�
��a�
�H�
�L�
�L�
�����#�0�0��6�7����#�0�0��6�7����#�0�0��6�7����#�0�0��6�7r r#)&r>r?r@rAr�r/r4r7rhrAr�rIrOrRrWrZrcrhrmrpr|r�r^r�r�r�r�r�r�r�r�r�r�r�r�r�rCrDrEs@rr-r-�
s������
B�L�*�
5�B� =�(�;�F�
1�1�*G�X/�7� 1�&�"
6�	B�
&�8�,�.�"	6�
E�>�N�
#�+�
Y�	.�
8�
8r r-c�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�NodeTransformerTestsi,c��[O[U22o[O[U22oU2o[OUO	U22oUOVu2P!r")r*r+rr��visit�assertASTEqual)r;�transformer_classr��
expected_code�initial_ast�expected_ast�transformer�
result_asts&&&&    r�assertASTTransformation�,NodeTransformerTests.assertASTTransformation-sX���i�i��t��-���y�y��
�!6�7��'�)���.�.�{�/@�/@��/M�N�
����J�5r c�f�QoQoQQ[O2oUOV1U2P!)zdef func(arg) -> SomeType: ...zdef func(arg): ...c�4`�\sQsQsnU1QkQksQsUsP!)�ENodeTransformerTests.test_node_remove_single.<locals>.SomeTypeRemoveri=c�6:�U]6�cPgQRZO-!�rrO)r*r�)rrFs"�rr�]NodeTransformerTests.test_node_remove_single.<locals>.SomeTypeRemover.visit_Name.__annotate__>����
�
�s�x�x�
r c�P�UOU2UOQ6XcP!U!)�SomeType)�
generic_visitr�rJs&&r�
visit_Name�PNodeTransformerTests.test_node_remove_single.<locals>.SomeTypeRemover.visit_Name>s$���"�"�4�(��7�7�j�(���r r#)r>r?r@rAr�rCrDrEs@r�SomeTypeRemoverr�=�����
�
r r��r*�NodeTransformerr�)r;r�r�r�s&   r�test_node_remove_single�,NodeTransformerTests.test_node_remove_single7s0��/��'��	�c�1�1�	�	
�$�$�_�H�Er c�f�QoQoQQ[O2oUOV1U2P!)zM
        def func(arg):
            print(arg)
            yield arg
        �7
        def func(arg):
            print(arg)
        c�4`�\sQsQsnU1QkQksQsUsP!)�ENodeTransformerTests.test_node_remove_from_list.<locals>.YieldRemoveriSc�6:�U]6�cPgQRZO-!r�)r*r�)rrFs"�rr�]NodeTransformerTests.test_node_remove_from_list.<locals>.YieldRemover.visit_Expr.__annotate__Tr�r c��UOU2[UO[O2%cP!U!r")r�rKrbr*r�rJs&&r�
visit_Expr�PNodeTransformerTests.test_node_remove_from_list.<locals>.YieldRemover.visit_ExprTs-���"�"�4�(��d�j�j�#�)�)�4�4���r r#)r>r?r@rAr�rCrDrEs@r�YieldRemoverr�Sr�r r�r�)r;r�r�r�s&   r�test_node_remove_from_list�/NodeTransformerTests.test_node_remove_from_listFs4����
��	�3�.�.�	�	
�$�$�\��Br c�f�QoQoQQ[O2oUOV1U2P!)z0
        class DSL(Base, kw1=True): ...
        zE
        class DSL(Base, kw1=True, kw2=True, kw3=False): ...
        c�4`�\sQsQsnU1QkQksQsUsP!)�BNodeTransformerTests.test_node_return_list.<locals>.ExtendKeywordsidc�6:�U]6�cPgQRZO-!r�)r*r�)rrFs"�rr�]NodeTransformerTests.test_node_return_list.<locals>.ExtendKeywords.visit_keyword.__annotate__es���
�
�#�+�+�
r c��UOU2UOQ6XcXU[OQ[OP	22[OQ[OP
22,!U!)�kw1�kw2�kw3)r�rDr*r�r�rJs&&r�
visit_keyword�PNodeTransformerTests.test_node_return_list.<locals>.ExtendKeywords.visit_keywordes^���"�"�4�(��8�8�u�$�����E�3�<�<��+=�>����E�3�<�<��+>�?���
�r r#)r>r?r@rAr�rCrDrEs@r�ExtendKeywordsr�ds����
�
r r�r�)r;r�r�r�s&   r�test_node_return_list�*NodeTransformerTests.test_node_return_list\s4������		�S�0�0�		�	
�$�$�^�8�Dr c�f�QoQoQQ[O2oUOV1U2P!)r�z5
        def func(arg):
            log(arg)
        c�4`�\sQsQsnU1QkQksQsUsP!)�9NodeTransformerTests.test_node_mutate.<locals>.PrintToLogi{c�6:�U]6�cPgQRZO-!r��r*rw)rrFs"�rr�QNodeTransformerTests.test_node_mutate.<locals>.PrintToLog.visit_Call.__annotate__|r�r c���UOU2[UO[O2%c-UOO
Q6XcQUOmU!)�print�log)r�rKrur*r�r�rJs&&r�
visit_Call�DNodeTransformerTests.test_node_mutate.<locals>.PrintToLog.visit_Call|sD���"�"�4�(��d�i�i����2�2�t�y�y�|�|�w�7N�#(�D�I�I�L��r r#�r>r?r@rArrCrDrEs@r�
PrintToLogr�{r�r r	r��r;r�r�r	s&   r�test_node_mutate�%NodeTransformerTests.test_node_mutateqs4������
	��,�,�	�	
�$�$�Z�x�@r c�f�QoQoQQ[O2oUOV1U2P!)r�zH
        def func(arg):
            logger.log(arg, debug=True)
        c�4`�\sQsQsnU1QkQksQsUsP!)�:NodeTransformerTests.test_node_replace.<locals>.PrintToLogi�c�6:�U]6�cPgQRZO-!r�r)rrFs"�rr�RNodeTransformerTests.test_node_replace.<locals>.PrintToLog.visit_Call.__annotate__�s���
�
�s�x�x�
r c
���UOU2[UO[O2%c�UOO
Q6Xc�[O[O[OQ[O2Q5Q[O2Q5UO[OQ[OP	22,Q5!U!)r�loggerrZr)r�r��debug)rur>r�)r�rKrur*r�r�rwr�r�r>r�r�rJs&&rr�ENodeTransformerTests.test_node_replace.<locals>.PrintToLog.visit_Call�s����"�"�4�(��d�i�i����2�2�t�y�y�|�|�w�7N��8�8� �]�]��H�H�X�3�8�8�:�>�!&� #���
��
"�Y�Y�"%�+�+�g�s�|�|�D�7I�"J�!K����r r#rrEs@rr	r�s����
�
r r	r�r
s&   r�test_node_replace�&NodeTransformerTests.test_node_replace�s4������

	��,�,�
	�	
�$�$�Z�x�@r r#)r>r?r@rAr�r�r�r�rrrCrDrEs@rr�r�,s.����6�
F�C�,E�*A�&A�Ar r�c�h`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsUsP!)�ASTConstructorTestsi�z2Test the autogenerated constructors for AST nodes.c��[O2oUOUO,2UOUO,2QoUO[[OU229^tt^2[OUQ5PPP2[OQUQ5oUOUOQ2UOUO,2P!)%fhKb9h)zGast.FunctionDef.__init__ missing 1 required positional argument: 'name'r�rr")r*rCr]r>r=rzrnr4rQr$rNrS)r;r>r{rOs&   r�test_FunctionDef�$ASTConstructorTests.test_FunctionDef�s����}�}���������B�'�����)�)�2�.�W��
�
#�
#�I�r�y�y��~�
>�
>��O�O��&�?����E��5��������E�*�����,�,�b�1�?�
>�s�C5�5D	�>D	c��[OQ2oUOUOQ2UO	UO
[O2[OQ[O22oUOUOQ2UO	UO
[O2[OQ[O2Q5oUOUOQ2UO	UO
[O2QoUO[[OU2[O2P!)rprZr)
r*r�r]r�r�r�r�r��Delrzrnr4rQ)r;rN�name2�name3r{s&    r�test_expr_context�%ASTConstructorTests.test_expr_context�s����x�x��}��������#�&����d�h�h����1�����c�i�i�k�*��������3�'����e�i�i����3�����#�'�'�)�,��������3�'����e�i�i����1�N�����y�"�)�)�C�.�#�(�(�Cr c��QQ[O2oU2oUOV!2UOUO-2P!)c��\sQsQsQsP!)�GASTConstructorTests.test_custom_subclass_with_no_fields.<locals>.NoIniti�r#r�r#r r�NoInitr%�r�r r&)r*rJr�r]rj)r;r&�objs&  r�#test_custom_subclass_with_no_fields�7ASTConstructorTests.test_custom_subclass_with_no_fields�s=��	�S�W�W�	��h�����c�*�������r�*r c��QQ[O2oU2oUO[29^tt^2UOPPP2U]Q5oUOUO]2P!)%fhK79h)c��\sQsQsQsQsP!)�BASTConstructorTests.test_fields_but_no_field_types.<locals>.Fieldsi�r#r�)r>r?r@rArTrCr#r r�Fieldsr,�s���Gr r-r�)r*rJrkrlr�r])r;r-r's&  r�test_fields_but_no_field_types�2ASTConstructorTests.test_fields_but_no_field_types�s^��	�S�W�W�	��h��
�
�
�~�
.�
.��E�E�/��q�k���������"�/�
.�s�
A;�;B	�B	c���QQ[O2oU2oUOUOP2U]Q5oUO	UO]2P!)c�L`�\sQsQsnQsQ\P*-sPsU1QksQs	Us
P!)�AASTConstructorTests.test_fields_and_types.<locals>.FieldsAndTypesi�r�c�6:�U]6�cPg-RZP*9Q$!)rr��r1)rrFs"�rr�NASTConstructorTests.test_fields_and_types.<locals>.FieldsAndTypes.__annotate__�s�����T�z� �r r#r�)r>r?r@rArTr1�_field_typesr��__annotate_func__rCrDrEs@r�FieldsAndTypesr2�s$�����G���t��,�L� �A��r r8r�)r*rJrr�r])r;r8r's&  r�test_fields_and_types�)ASTConstructorTests.test_fields_and_types�sL��	!�S�W�W�	!�
����
�
�c�e�e�T�"��q�!���������"r c�r�QQ[O2oU]]Q5oUOUO]2UOUO]2QoUO[[OU229^tt^2U]Q5PPP2P!)%fhP!9h)c��\sQsQsQsQsP!)�;ASTConstructorTests.test_custom_attributes.<locals>.MyAttrsi�r#r�)r>r?r@rAr�rCr#r r�MyAttrsr=�s��$�Kr r>r�z7MyAttrs.__init__ got an unexpected keyword argument 'c')r�)	r*rJr]r�r�rzrnr4rQ)r;r>r'r{s&   r�test_custom_attributes�*ASTConstructorTests.test_custom_attributes�s~��	%�c�g�g�	%���Q����������"��������"�G��
�
#�
#�I�r�y�y��~�
>�
>��a�L�?�
>�
>�
>�s�
B%�%B6	�.B6	c���QQ[O2oQoUO[[O
U2U2U]Q5oUO
UO]2P!)c�$�\sQsQsQsQ\-sQsP!)�UASTConstructorTests.test_fields_and_types_no_default.<locals>.FieldsAndTypesNoDefaulti�r�r#r��r>r?r@rArTr1r6rCr#r r�FieldsAndTypesNoDefaultrC�s���G���:�Lr rEzLFieldsAndTypesNoDefault.__init__ missing 1 required positional argument: 'a'r�)r*rJrzrnr4rQr]r�)r;rEr{r's&   r� test_fields_and_types_no_default�4ASTConstructorTests.test_fields_and_types_no_default�sS��	&�c�g�g�	&�]�����y�"�)�)�C�.�:Q�R�%��*���������"r c���QQ[O2oQoUO[V!2U]]Q5oUO	UO
]2UO	UO]2P!)c�P`�\sQsQsnQsQ\P*-sPsPsU1Qks	Qs
UsP!)�LASTConstructorTests.test_incomplete_field_types.<locals>.MoreFieldsThanTypesi�r�c�P:�U]6�cPg-RZP*9Q$RZP*9Q$!�rr�r�r4)rrFs"�rr�YASTConstructorTests.test_incomplete_field_types.<locals>.MoreFieldsThanTypes.__annotate__�s'�����T�z� ���T�z� �	r r#r�)r>r?r@rArTr1r6r�r�r7rCrDrEs@r�MoreFieldsThanTypesrJ�s)���� �G���t��,�L� �A� �A�	�r rNz?Field 'b' is missing from .*\.MoreFieldsThanTypes\._field_typesr�)r*rJrzrnr]r�r�)r;rNr{r's&   r�test_incomplete_field_types�/ASTConstructorTests.test_incomplete_field_types�s^��	!�#�'�'�	!�Q�����y�#�C�!�A��+���������"��������"r c�h�QQ[O2oUO[QU2P!)c�$�\sQsQsQsQ\-sQsP!)�GASTConstructorTests.test_malformed_fields_with_bytes.<locals>.BadFieldsi
r�r#)s@����������������������������������������������������������������rDr#r r�	BadFieldsrS
s��#�G���:�Lr rTzField b'\\xff\\xff.*' .*)r*rJrzrn)r;rTs& r� test_malformed_fields_with_bytes�4ASTConstructorTests.test_malformed_fields_with_bytes
s'��	&����	&�
	
���y�*E�y�Qr c��QQ[O2oU2oUOUOP2UO	UO
,2P!)c�^`�\sQsQsnQsQ\P*Q\\*-sPs	U1Qks
QsUsP!)�EASTConstructorTests.test_complete_field_types.<locals>._AllFieldTypesi

r�r�c�R:�U]6�cPg-RZP*9Q$RZRZ*9Q$!rL)r1rr)rrFs"�rr�RASTConstructorTests.test_complete_field_types.<locals>._AllFieldTypes.__annotate__

s&�����T�z� �	��C�y�L�
r r#r�)
r>r?r@rArTr1rrr6r�r7rCrDrEs@r�_AllFieldTypesrY

s,���� �G���t��S�$�s�)�<�L� �A�	�r r\)r*rJrr�r]r�)r;r\r's&  r�test_complete_field_types�-ASTConstructorTests.test_complete_field_types	
sB��	�S�W�W�	�����
�
�c�e�e�T�"��������#r c
��QoUO[29^tt^2UO[U29^tt^2[O
Q-[
2Q-@PPP2PPP2QQ2oUO[Q29^tt^2[O
Q-UQ2Q-@PPP2P!)%fhKj9h)%fhKu9h)%fhP!9h)r1r
c�4`�\sQsQsnQsQsQsQsUsP!)�7ASTConstructorTests.test_non_str_kwarg.<locals>.FakeStri
c��VmP!r"rO)r;rbs&&rr\�@ASTConstructorTests.test_non_str_kwarg.<locals>.FakeStr.__init__
s��"�
r c�.�[UO2!r")�hashrbr:s&r�__hash__�@ASTConstructorTests.test_non_str_kwarg.<locals>.FakeStr.__hash__"
s���D�J�J�'�'r c�R�[U[29%cUOU6H!r")rKrrb)r;�others&&r�__eq__�>ASTConstructorTests.test_non_str_kwarg.<locals>.FakeStr.__eq__%
s ��!�%��-�E�E�$�*�*��2E�Er rO)	r>r?r@rAr\rfrjrCrDrEs@r�FakeStrra
s����
#�
(�
F�
Fr rlz got multiple values for argumentr�r#r�)rkrn�assertWarnsRegexrir*r�r2rz)r;�warn_msgrls&  r�test_non_str_kwarg�&ASTConstructorTests.test_non_str_kwarg
s���F�����i�(�(��!�!�"4�h�?�?��H�H�'���#��'�
@�
)�
	F�	F��
#�
#�I�/Q�
R�
R��H�H�1�W�T�]�C�0�1�S�
R�
@�?��
)�(��S�
R�
R�sA�C�"C	�"C� C*�C
�
C
�C�C'	� C'	�*C;	�3C;	r#)r>r?r@rAr�rr!r(r.r9r?rFrOrUr]rorCrDrEs@rrr�sF����<�
2�D� +�#�	#�
�	#�#�R�$�2�2r rc�:`�\sQsQsnQsQsQsQsQsUs	P!)�ModuleStateTestsi,
c��QoQoQo[VU[OQ5o[VBU2oUOU[O
2P!)zx + 1r�r���flags)r�r*r�r��types�CodeType)r;r�r�r�r�s&    r�check_ast_module�!ModuleStateTests.check_ast_module0
sI���������4�4�s�7H�7H�I���x�4�0�����d�E�N�N�3r c�^�[O[OQP29^tt^2[OQ]PHo[OQ]PHoUO2PPP2==[O2UO2P!)%fhK99h)r*)r�	swap_itemrt�modulesr*rxr�)r;�ast1r�s&  r�test_reload_module�#ModuleStateTests.test_reload_module=
ss��
�
�
�s�{�{�F�D�
9�
9����F�#�����F�#���!�!�#�:�
����������:�
9�s�;B�B,	�%B,	c	��`�[2nU1Qko[O[OQP29^tt^2[OQ[O
[QU29^tt^2UO2UOQ[O2]PH&oUOUR2PPP2PPP2P!)%fhK9h)%fhP!9h)c�0:�R[OU$R!r")rtr|)rNr>rE�lazy_mods&*,�r�	my_import�4ModuleStateTests.test_sys_modules.<locals>.my_importT
s��� (�C�K�K����Or r*�
__import__)r2rr{rtr|r�r�rxrpr*r)r;r�r*r�s&  @r�test_sys_modules�!ModuleStateTests.test_sys_modulesO
s�����8��	��
�
�s�{�{�F�D�
9�
9����F�#��"�"�8�\�9�E�E��%�%�'�� � �����5���
�
�d�H�-�F�:�
9�F�E��:�
9�
9�s1�6C#�7AC	�>C#�C 
�C 
�C#�#C4	�,C4	c�n�[Q2o[OU2oUOU]2P!)ap
            import _ast
            import ast
            import gc
            import sys
            import types

            # Create _ast.AST subclasses instances and call PyAST_Check()
            ast_tree = compile('x+1', '<string>', 'eval',
                               flags=ast.PyCF_ONLY_AST)
            code = compile(ast_tree, 'string', 'eval')
            if not isinstance(code, types.CodeType):
                raise AssertionError

            # Unloading the _ast module must not crash.
            del ast, _ast
            del sys.modules['ast'], sys.modules['_ast']
            gc.collect()
        )rr�run_in_subinterpr])r;r�r�s&  r�test_subinterpreter�$ModuleStateTests.test_subinterpreterd
s5����
��&�&�&�t�,������a� r r#)
r>r?r@rArxr~r�r�rCrDrEs@rrrrr,
s����4� �$.�*!�!r rrc��`�\sQsQsnQs\Q2sQsQsQs	\
OQ2Q2s\
OQ	2sQ
sQsQsQ
sQsQsQsQsQsQsQsQsUsP!)�CommandLineTestsi~
c��[O2UmUO[O
UO2P!r")�tempfile�mktempr�ryr�unlinkr:s&r�setUp�CommandLineTests.setUp�
s(�� ���)��
����	�(�(�$�-�-�8r c�L�[OU2O2!r")r�rr)r�s&r�text_normalize�CommandLineTests.text_normalize�
s�����v�&�,�,�.�.r c�n�[UO2OUOU22P!r")rr�r-r�)r;r3s&&r�
set_source�CommandLineTests.set_source�
s$���T�]�]��&�&�t�':�':�7�'C�Dr c	���[2o[2o[OU29^tt^2[OU29^tt^2[O
,UNUOMQ5PPP2PPP2UOUO2P2UO2O2!)%fhKV9h)%fhKa9h)r�)
rr8�redirect_stdout�redirect_stderrr*�mainr�r]�getvaluer)r;ru�stderr�stdouts&*  r�
invoke_ast�CommandLineTests.invoke_ast�
s����������&�&�v�.�.��&�&�v�.�.��H�H�1�E�1�4�=�=�1�2�
/�
/�	
������*�B�/���� �&�&�(�(�	
/�.��
/�.�s/�C�&C	�9C�C
�C
�C�C*	�#C*	c��UOU2UOUoUOU2oUOVB2P!r")r�r�r�r])r;r��expectrur�s&&&* r�check_output�CommandLineTests.check_output�
s:��������o�o�u�%���$�$�V�,������%r r�c
�~�QoUOQ2[][U2]*2FDso[OVQ5FDTo[O
UFD7oUO
UQ59^tt^2UOUPPP2J9	JV	Ju	P!)%fhJV9h)�-m=execzv
            print(1, 2, 3)
            def f(x: int) -> int:
                x -= 1
                return x
        )r2rt)�r�z--mode=exec)�--no-type-commentsr��z-az--include-attributes)z-i=4z
--indent=4)�--feature-version=3.13r�)�-O=-1�
--optimize=-1)�--show-emptyr�)r�rEr��	itertools�combinations�productr�r�)r;�
base_flagsr2�choicesr>s&    r�test_invocation� CommandLineTests.test_invocation�
s���
�
�	
����	
��q�#�j�/�A�-�.�A�$�1�1�*�B�B��%�-�-�w�7�D����D��1�1�����.�2�1�8�C�/�2�1�1�s�B+�+B<�4B<c
���QFD�oUOUQ59^tt^2[2oUO[29^tt^2[O
U29^tt^2[OUQ5PPP2PPP2UOUO2Q2PPP2J�	P!)%fhKF9h)%fhKQ9h)%fhJ�9h)�-h��flagr�zusage: )r�z--helpz	--unknown)
r�rrk�
SystemExitr8r�r*r��assertStartsWithr�)r;r�r�s&  r�test_help_message�"CommandLineTests.test_help_message�
s���1�D����4��(�(�!����&�&�z�2�2�#�3�3�F�;�;����d�+�<�3��%�%�f�o�o�&7��C�)�(�2�<�;��3�2��)�(�(�sM�(C%	�
C
�)B?�C
�	(C%	�?C�C�
C
�C"�C"�C%	�%C6
�.C6
c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)�&x: bool = 1 # type: ignore[assignment]ab
            Module(
               body=[
                  AnnAssign(
                     target=Name(id='x', ctx=Store()),
                     annotation=Name(id='bool'),
                     value=Constant(value=1),
                     simple=1)],
               type_ignores=[
                  TypeIgnore(lineno=1, tag='[assignment]')])
        r�r��r�r��r;r�r�r�s&   r�test_exec_mode_flag�$CommandLineTests.test_exec_mode_flag�
sM��9��
��/�D����4��(�(��!�!�&�$�7�)�(�/�(�(�(���A	�A
�A
c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)r2zS
            Interactive(
               body=[
                  Pass()])
        r�)z	-m=singlez
--mode=singler�r�s&   r�test_single_mode_flag�&CommandLineTests.test_single_mode_flag�
sM������
3�D����4��(�(��!�!�&�$�7�)�(�3�(�(�(�r�c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)�print(1, 2, 3)z�
            Expression(
               body=Call(
                  func=Name(id='print'),
                  args=[
                     Constant(value=1),
                     Constant(value=2),
                     Constant(value=3)]))
        r�)z-m=evalz--mode=evalr�r�s&   r�test_eval_mode_flag�$CommandLineTests.test_eval_mode_flag�
sM��!����/�D����4��(�(��!�!�&�$�7�)�(�/�(�(�(�r�c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)z(int, str) -> list[int]z�
            FunctionType(
               argtypes=[
                  Name(id='int'),
                  Name(id='str')],
               returns=Subscript(
                  value=Name(id='list'),
                  slice=Name(id='int')))
        r�)z-m=func_typez--mode=func_typer�r�s&   r�test_func_type_mode_flag�)CommandLineTests.test_func_type_mode_flag�
sM��*����9�D����4��(�(��!�!�&�$�7�)�(�9�(�(�(�r�c�4�QoQoUOVQ2P!)r�a
            Module(
               body=[
                  AnnAssign(
                     target=Name(id='x', ctx=Store()),
                     annotation=Name(id='bool'),
                     value=Constant(value=1),
                     simple=1)])
        r��r��r;r�r�s&  r�test_no_type_comments_flag�+CommandLineTests.test_no_type_comments_flag�
s!��9����	
���&�*>�?r c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)r2z�
            Module(
               body=[
                  Pass(
                     lineno=1,
                     col_offset=0,
                     end_lineno=1,
                     end_col_offset=4)])
        r�r�r�r�s&   r�test_include_attributes_flag�-CommandLineTests.test_include_attributes_flagsM������3�D����4��(�(��!�!�&�$�7�)�(�3�(�(�(�r�c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)r2zE
            Module(
            body=[
            Pass()])
        r�)z-i=0z
--indent=0r�r�s&   r�test_indent_flag�!CommandLineTests.test_indent_flagsM������
+�D����4��(�(��!�!�&�$�7�)�(�+�(�(�(�r�c���QoQoUOVQ2UO[29^tt^2UOQ2PPP2P!)%fhP!9h)zO
            match x:
                case 1:
                    pass
        al
            Module(
               body=[
                  Match(
                     subject=Name(id='x'),
                     cases=[
                        match_case(
                           pattern=MatchValue(
                              value=Constant(value=1)),
                           body=[
                              Pass()])])])
        z--feature-version=3.10z--feature-version=3.9)r�rkr�r�r�s&  r�test_feature_version_flag�*CommandLineTests.test_feature_version_flag'sP����
��	
���&�*B�C�
�
�
�{�
+�
+��O�O�3�4�,�
+�
+�
+�s�A�A"	�A"	c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)�R
            match a:
                case 1+2j:
                    pass
        a
            Module(
               body=[
                  Match(
                     subject=Name(id='a'),
                     cases=[
                        match_case(
                           pattern=MatchValue(
                              value=BinOp(
                                 left=Constant(value=1),
                                 op=Add(),
                                 right=Constant(value=2j))),
                           body=[
                              Pass()])])])
        r�)r�r�z-O=0z--optimize=0r�r�s&   r�test_no_optimize_flag�&CommandLineTests.test_no_optimize_flag>sQ����
��G�D����4��(�(��!�!�&�$�7�)�(�G�(�(�(�r�c	��QoQoQFD8oUOUQ59^tt^2UOVU2PPP2J:	P!)%fhJO9h)r�aq
            Module(
               body=[
                  Match(
                     subject=Name(id='a'),
                     cases=[
                        match_case(
                           pattern=MatchValue(
                              value=Constant(value=(1+2j))),
                           body=[
                              Pass()])])])
        r�)z-O=1z--optimize=1z-O=2z--optimize=2r�r�s&   r�test_optimize_flag�#CommandLineTests.test_optimize_flagXsQ����
��E�D����4��(�(��!�!�&�$�7�)�(�E�(�(�(�r�c�4�QoQoUOVQ2P!)r�a�
            Module(
               body=[
                  Expr(
                     value=Call(
                        func=Name(id='print', ctx=Load()),
                        args=[
                           Constant(value=1),
                           Constant(value=2),
                           Constant(value=3)],
                        keywords=[]))],
               type_ignores=[])
        r�r�r�s&  r�test_show_empty_flag�%CommandLineTests.test_show_empty_flagos ��!����	
���&�.�9r )r�)r>r?r@rAr�r5r�r�r�r�rr�r��force_not_colorizedr�r�r�r�r�r�r�r�r�r�r�r�rCrDrEs@rr�r�~
s�����9��/��/�E�	)�&�
���u�%�/�&�/�0
� � �D�!�D�8�$
8�8� 8� @�8� 
8�5�.8�48�.:�:r r�c�F`�\sQsQsnQsQsQsQsQsQs	Qs
UsP!)	�ASTOptimizationTestsi�c�^�[O[OUQ5,Q5!)rOr�)r*r�r�)r;rUs&&r�	wrap_expr�ASTOptimizationTests.wrap_expr�s���z�z����t� 4�5�6�6r c�4�[OU,Q5!)r�)r*r�)r;�	statements&&r�wrap_statement�#ASTOptimizationTests.wrap_statement�s���z�z�	�{�+�+r c�Z�[OUPQ5o[OU]Q5oUO[OVB2[OU2Q[OU202UO[OVR2[OU2Q[OU202UO[OVS2[OU2Q[OU202P!)r�r�z must equal z must not equal )r*r+rer�r�rf)r;r��non_optimized_target�optimized_target�non_optimized_tree�optimized_trees&&&&  r�
assert_ast�ASTOptimizationTests.assert_ast�s��� �Y�Y�t�b�9�����4�!�4��	
����K�K�*�A��x�x�,�-�.�l��x�x�*�+�,�
.�	
�	
����K�K��=��x�x�,�-�.�.>��x�x�*�+�,�
.�	
�	
����K�K��:��x�x�(�)�*�,��x�x��'�(�
*�	
r c���QoUO[O[OQQ5[O2[O
[OQQ5,Q5Q52oUO[O[O[OQQ5]sQ5,Q52oUOVU2P!)	z'%s' % (a,)z%srOr�r)rvrr)rbri)r�)
r�r*rsr��Modr�r��	JoinedStr�FormattedValuer�)r;r�r�r�s&   r�test_folding_format�(ASTOptimizationTests.test_folding_format�s�����#�~�~��I�I��\�\��-��7�7�9��i�i�c�h�h�#�&6�%7�8�
:� 
�� �>�>��M�M��&�&�S�X�X��-=�#�N��
�
��	
����4D�Er c	��``	�U	U1Qkn	,Q],1MQQ(,1MQ[]]2,1MQ[]Q(2,1MQ[]]2,1MQ[]Q)2,1MQ[Q	Q
2,1MQ[Q	Q*2,1MQ[]]2,1MQ
[]P2,1MQ[Q(Q	2,1MQ[Q(Q+2,1MQ],1MQQ(,1MQ[]]2,1MQ[]Q(2,1MQ[]]2,1MQ[]Q)2,1MQ[Q	Q
2,1MQ[Q	Q*2,1MQ[]]2,1MQ[]P2,1MQ[Q(Q	2,1MQ[Q(Q+2,1MQ][]]2[Q]2,1MQ]Q([]]2[]Q(2,1MQ]Q([]]2[]Q(2,1MQ]Q([]]2[]Q(2,1MQ ]Q([]]2[]Q(2,1MQ!]Q([]]2[]Q(2,1MQ"]Q([]]2[]Q(2,1MQ#]Q([]]2[]Q(2,1MQ$]Q([]]2[]Q(2,1MoSFD�vq#ROU29^tt^2Q%UQ&0o[OU]Q'5oUO]*oUO
]*oR	UO2oROV82PPP2J�	P!)%fhJ�9h),c�j:�,o[U[O2%cUOUO2U![U[O
2%c$UO
RUO22U![U[O2%c.UOFDoUO
RU22J	U![U[O2%c.UOFDoUO
RU22J	U!ROQU02U!)zUnexpected node )rKr*r�r}rbr�r r�r�r�r��fail)rOr�key�pat�get_match_case_valuesr;s&   ��rr�_ASTOptimizationTests.test_folding_match_case_allowed_expressions.<locals>.get_match_case_values�s�����F��$����-�-��
�
�d�j�j�)��M��D�#�.�.�1�1��
�
�3�D�J�J�?�@��M��D�#�"2�"2�3�3��9�9�C��M�M�"7��"<�=�%��M��D�#�"3�"3�4�4��=�=�C��M�M�"7��"<�=�)��M��	�	�,�T�F�3�4��Mr z-0z-0.1g�������?z-0jz-0.1jz1 + 2jz1 - 2jz
1.1 + 2.1jg�������?g������@z
1.1 - 2.1jz-0 + 1jz-0 - 1jz-0.1 + 1.1jz-0.1 - 1.1jz{-0: 0}z	{-0.1: 0}z{-0j: 0}z
{-0.1j: 0}z{1 + 2j: 0}z{1 - 2j: 0}z{1.1 + 2.1j: 0}z{1.1 - 2.1j: 0}z{-0 + 1j: 0}z{-0 - 1j: 0}z{-0.1 + 1.1j: 0}z{-0.1 - 1.1j: 0}z{-0: 0, 0 + 1j: 0, 0.1 + 1j: 0}z[-0, -0.1, -0j, -0.1j]z[[[[-0, -0.1, -0j, -0.1j]]]]z[[-0, -0.1], -0j, -0.1j]z[[-0, -0.1], [-0j, -0.1j]]z(-0, -0.1, -0j, -0.1j)z((((-0, -0.1, -0j, -0.1j))))z((-0, -0.1), -0j, -0.1j)z((-0, -0.1), (-0j, -0.1j))zmatch 0:
	 case z: passr�g��������r�g�������g�������)�complexr�r*r+r�r�r��assertListEqual)
r;r��
match_exprr�rxr��
match_stmt�caser�rs
f        @r�+test_folding_match_case_allowed_expressions�@ASTOptimizationTests.test_folding_match_case_allowed_expressions�s���	� "
�
�A�3�K�"
�
�d�V��"
��W�Q��]�O�$�"
��w�q�$�'�(�)�	"
�
���1�
��'�"
����2��'�(�
"
��G�C��-�.�/�"
��G�C��.�/�0�"
����A���(�"
����B��(�)�"
��W�T�3�/�0�1�"
��W�T�4�0�1�2�"
�����"
��4�&�!�"
��'�!�Q�-��)�"
� �G�A�t�,�-�.�!"
�"�W�Q��]�O�,�#"
�$�W�Q��^�,�-�%"
�&���c�!2� 3�4�'"
�(���d�!3� 4�5�)"
�*�g�a��m�_�-�+"
�,�g�a��n�-�.�-"
�. �'�$��"4�!5�6�/"
�0 �'�$��"5�!6�7�1"
�2/��G�A�q�M�7�3�PQ�?�0S�T�3"
�4&��4���A����4�@P�'Q�R�5"
�6,�a��w�q�!�}�g�a�QU�FV�-W�X�7"
�8(�!�T�7�1�a�=�'�!�T�BR�)S�T�9"
�:*�A�t�W�Q��]�G�A�t�DT�+U�V�;"
�<&��4���A����4�@P�'Q�R�="
�>,�a��w�q�!�}�g�a�QU�FV�-W�X�?"
�@(�!�T�7�1�a�=�'�!�T�BR�)S�T�A"
�B*�A�t�W�Q��]�G�A�t�DT�+U�V�C"
��F&+�!�J����j�)�)�*�:�,�f�=���y�y��q�1��!�Y�Y�q�\�
�!�'�'��*��.�t�|�|�<���$�$�Y�7�
*�)�&+�)�)�)�s�)A(K	�K0
�(K0
c���[OQ2oQoQoQFDHoSOU%cSLS[O[O
VQ522JJ	P!)zV
            match a:
                case 1+2j:
                    pass
            zRMatchValue(value=BinOp(left=Constant(value=1), op=Add(), right=Constant(value=2j))z(MatchValue(value=Constant(value=(1+2j)))r�r�)r�rr�r*r�r+)r;rx�unfolded�foldedr�s&    r�-test_match_case_not_folded_in_unoptimized_ast�BASTOptimizationTests.test_match_case_not_folded_in_unoptimized_ast�sP���o�o����h��;���F��M�M�F�&��#�(�(�3�9�9�S�Cb�:c�d� r r#)r>r?r@rAr�r�r�r�rrrCrDrEs@rr�r��s,����7�,�
�2F�&;8�z
e�
er r��__main__z--snapshot-update)Nr_r*r*r�r8r�rr5r�r�r4rtr�r�rv�unittestr�r��ior�pathlibrrrv�ImportErrorr/r�test.supportrrrr	r
�test.support.ast_helperr�test.support.import_helperr
�test.test_ast.utilsr�test.test_ast.snippetsrrrrrrr��dirname�__file__r��listdir�endswithr�r r�r,r$r0�TestCaser2rHr�r7r�r�r-r�rrBrr�force_not_colorized_test_classr�r�r>r��argv�exitr�)r�s0r�<module>r$s�����
����
���	�	�
�������������"�N�N�1�:�(���

��������	&���Z�Z��/�F�/�r�;�;�u�3E���/�F�����+�-E�F�G��(�^�*�*�V�3�n�D��#�3�
g�X�&�&�g�i6��!�!�i6�X!d0��!�!�d0�Nq=�h�'�'�q=�h{6��)�)�{6�|C'�H�%�%�C'�La8�x�(�(�a8�HqA�<��):�):�qA�hI2�(�+�+�I2�X	���N!�x�(�(�N!��N!�b	�'�'�@:�x�(�(�@:�(�@:�Fze�8�,�,�ze�z�z��
�3�8�8�}�q��S�X�X�a�[�,?�?�!�#�������M�M�O�	��Ow������"Gs$�J9�K	�2K	�9K�?K�K

Youez - 2016 - github.com/yon3zu
LinuXploit