403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.217.51
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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_unparse.cpython-315.opt-1.pyc
R
>lqj#�c�Z�Qs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]QH$G
s
QsQsQs
QsQsQsQsQ	sQ
sQsQsQ
sQsQsQsQQ\
\O42sQQ\2sQQ\2sQQ\O42sQQ\2s\ Q6Xc\OB2P!P!)zTests for ast.unparse.)�ASTTestMixinc��[OU29^tt^2oUO2ttPPP2!)%fhP!9h)zjRead and return the contents of a Python source file (as a
string), taking into account the file encoding.)�tokenize�open�read)�filename�streams& �&C:\Python315\\Lib\test\test_unparse.py�read_pyfiler	
s-��
���x�	 �	 �F��{�{�}�
!�	 �	 �	 �s�;�A	�A	zQdef f():
    for x in range(10):
        break
    else:
        y = 2
    z = 3
zIdef g():
    while True:
        break
    else:
        y = 2
    z = 3
zQfrom . import fred
from .. import barney
from .australia import shrimp as prawns
zzdef f():
    x = 1
    def g():
        nonlocal x
        x = 2
        y = 7
        def h():
            nonlocal x, y
zOtry:
    1 / 0
except ZeroDivisionError as e:
    raise ArithmeticError from e
z@f1(arg)
@f2
class Foo: pass
z=if cond1:
    suite1
elif cond2:
    suite2
else:
    suite3
z,if cond1:
    suite1
elif cond2:
    suite2
zctry:
    suite1
except ex1:
    suite2
except ex2:
    suite3
else:
    suite4
finally:
    suite5
zetry:
    suite1
except* ex1:
    suite2
except* ex2:
    suite3
else:
    suite4
finally:
    suite5
zwith f():
    suite1
zwith f() as x:
    suite1
z$with f() as x, g() as y:
    suite1
c�R`�\sQs]�snQs\1QksQQksQQksQQks	Qs
UsP!)�ASTTestCasec�$�UOVQ59^tt^2[OU1-U@o[OU2o[OU1-U@oUO	V52PPP2P!)%fhP!9h))�code1�ast_parse_kwargs)�subTest�ast�parse�unparse�assertASTEqual)�selfr
�kwargs�ast1�code2�ast2s&&,   r�check_ast_roundtrip�ASTTestCase.check_ast_roundtrip�se��
�\�\��\�
?�
?��9�9�U�-�f�-�D��K�K��%�E��9�9�U�-�f�-�D�����+�	@�
?�
?�
?�s�AA>�>B	�B	c��UOUQ59^tt^2UOU[OU2PPP2P!)%fhP!9h))�node)r�assertRaisesrr)rr�raisess&&&r�
check_invalid�ASTTestCase.check_invalid�s8��
�\�\�t�\�
$�
$����f�c�k�k�4�8�%�
$�
$�
$�s�"A�A	�A	c�z�S9%fSo[O[OU1-U@2oV1!�N)rrr�rr
rrs&&&,r�
get_source�ASTTestCase.get_source�s1����������C�I�I�e�6�v�6�7���|��c���UOV1-U@vqUOVQ59^tt^2UOV!2PPP2P!)%fhP!9h�)r
r)r$r�assertEqualr#s&&&,r�check_src_roundtrip�ASTTestCase.check_src_roundtrip�sE�����u�>�v�>���
�\�\��\�
3�
3����U�*�4�
3�
3�
3�s�A�A	�A	c��UOV2vqUOVQ59^tt^2UOV!2PPP2P!)%fhP!9hr()r$r�assertNotEqual)rr
rs&&&r�check_src_dont_roundtrip�$ASTTestCase.check_src_dont_roundtrip�s@�����u�4���
�\�\��\�
3�
3�����-�4�
3�
3�
3�s�A�A	�A	�r")�__name__�
__module__�__qualname__�__firstlineno__r�
ValueErrorrr$r*r.�__static_attributes__�__classdictcell__��
__classdict__s@rrr�s(����,�*4�9��
+�
.�.r&rc�r`�\sQs]�snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs Qs!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-s0Q.s1Q/s2Q0s3Q1s4Q2s5Q3s6Q4s7Q5s8Q6s9Q7s:Q8s;Q9s<Us=P!):�UnparseTestCasec�(�UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2UOQ2UOQ
2UOQ2UOQ2P!)zf'a'zf'{{}}'zf'{{5}}'z	f'{{5}}5'z	f'X{{}}X'zf'{a}'zf'{ {1:2}}'zf'a{a}a'zf'a{a}{a}a'zf'a{a}a{a}a'zf'{a!r}x{a!s}12{{}}{a!a}'z	f'{a:10}'zf'{a:100_000{10}}'zf'{a!r:10}'z
f'{a:a{b}10}'zRf'a{b}{c!s}{d!r}{e!a}{f:a}{g:a{b}}{h!s:a}{j!s:{a}b}{k!s:a{b}c}{l!a:{b}c{d}}{x+y=}'�r�rs&r�
test_fstrings�UnparseTestCase.test_fstrings�s���� � ��(�� � ��+�� � ��,�� � ��-�� � ��-�� � ��*�� � ��/�� � ��,�� � ��/�� � ��0�� � �!<�=�� � ��-�� � �!5�6�� � ��/�� � ��1�� � �<�	
r&c��UOQ2UOQ2UOQ2UOQ2P!)z
f'{f"{0}"*3}'z
f'{f"{y}"*3}'zf''zf"""'end' "quote\""""r=r>s&r�test_fstrings_special_chars�+UnparseTestCase.test_fstrings_special_chars�s=��� � �!5�6�� � �!5�6�� � ��+�� � �!=�>r&c��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)zf'''{"'"}'''�%f'''-{f"""*{f"+{f'.{x}.'}+"}*"""}-'''z4f'''-{f"""*{f"+{f'.{x}.'}+"}*"""}-'single quote\''''zf"""{'''
'''}"""zf"""{g('''
''')}"""z	f"a\r\nb"�f"\u2028{'x'}"r=r>s&r�test_fstrings_complicated�)UnparseTestCase.test_fstrings_complicated�sk��� � �!3�4�� � �!R�S�� � �!b�c�� � �!:�;�� � �!=�>�� � �!2�3�� � �!6�7r&c�L�UOQ2UOQ2P!)z0f" something { my_dict["key"] } something else "z!f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}"r=r>s&r�test_fstrings_pep701�$UnparseTestCase.test_fstrings_pep701�s ��� � �!S�T�� � �!D�Er&c���UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2UOQ2P!)
zt'foo'zt'foo {bar}'zt'foo {bar!s:.2f}'z
t'{a +    b}'zt'{a +    b:x}'zt'{a +    b!s}'z	t'{ {a}}'z
t'{ {a}=}'zt'{{a}}'zt''zt""�t'{(lambda x: x)}'zt'{t'{x}'}'r=r>s&r�
test_tstrings�UnparseTestCase.test_tstrings�s���� � ��*�� � ��0�� � �!5�6�� � ��1�� � �!2�3�� � �!2�3�� � ��-�� � ��.�� � ��,�� � ��'�� � ��'�� � �!5�6�� � ��/r&c
��UO[O[O[O[O
Q[O2Q5QPQ5,Q52Q2P!)�test1��id�ctx�test2��value�str�
conversion��valuesz
t'{test2}')r)rr�TemplateStr�
Interpolation�Name�Loadr>s&r�'test_tstring_with_nonsensical_str_field�7UnparseTestCase.test_tstring_with_nonsensical_str_field�sY������K�K�����)�)�"%�(�(�g�3�8�8�:�"F�G�`b����
�
�	
r&c�D�UO[O[O[O[O
QQ5PPQ5,22Q2UO[O[O[O[O[O[OQQ5,Q5[O
QQ5Q5PPQ5,22Q2UO[O[O[O[O[O[O
QQ5Q	PQ5,2PPQ5,Q
52Q2UO[O[O[O[O[O[O
QQ5PPQ5,2PPQ5,Q
52Q2UO[O[O[O[OQ
Q5P]rQ5,22Q2P!)rQ)rSrVz
t'{test1}'�x)�arg)�args)re�bodyrM�yrZzt"{t'{y}'}"zt"{t'{x}'}"�foo�rWzt"{'foo'!r}")
r)rrr\r]r^�Lambda�	argumentsrd�Constantr>s&r� test_tstring_with_none_str_field�0UnparseTestCase.test_tstring_with_none_str_field�s�������K�K�����&�&�S�X�X��-A�t�XZ�[�\��
�

�
	
�	
����K�K�����)�)�"%�*�*�%(�]�]����S�9I�8J�%K�%(�X�X��%5�#�!%�')�
�	��

�
!�	
�"	
����K�K�����)�)�"%�/�/�!$�!2�!2����S�9I�s�_a�!b� c�#�!%�')�
�	��

�
�	
�"	
����K�K�����)�)�"%�/�/�!$�!2�!2����S�9I�t�`b�!c� d�#�!%�')���
�
�
�	
� 	
����K�K�����"�"����E�)B��Y\�]�^��
�
�		
r&c�n�UOQ2UOQ2UOQ2P!)zu'foo'zr'foo'zb'foo'r=r>s&r�test_strings�UnparseTestCase.test_strings-s,��� � ��*�� � ��*�� � ��*r&c�*�UOQ2P!)zdel x, y, zr=r>s&r�test_del_statement�"UnparseTestCase.test_del_statement2s��� � ��/r&c�L�UOQ2UOQ2P!)z45 << 2z13 >> 7r=r>s&r�test_shifts�UnparseTestCase.test_shifts5s��� � ��+�� � ��+r&c�2�UO[2P!r")r�for_elser>s&r�
test_for_else�UnparseTestCase.test_for_else9s��� � ��*r&c�2�UO[2P!r")r�
while_elser>s&r�test_while_else�UnparseTestCase.test_while_else<���� � ��,r&c��UOQ2UOQ2UOQ2UOQ2UOQ2P!)z(-1)**7z(-1.)**8z(-1j)**6znot True or FalsezTrue or not Falser=r>s&r�test_unary_parens�!UnparseTestCase.test_unary_parens?sJ��� � ��+�� � ��,�� � ��,�� � �!4�5�� � �!4�5r&c�*�UOQ2P!)z3 .__abs__()r=r>s&r�test_integer_parens�#UnparseTestCase.test_integer_parensFs��� � ��0r&c��UOQ2UOQ2UOQ2UOQ2P!)�1e1000z-1e1000�1e1000jz-1e1000jr=r>s&r�test_huge_float�UnparseTestCase.test_huge_floatIs:��� � ��*�� � ��+�� � ��+�� � ��,r&c���UO[O[O[O[Q2Q522[OQ22P!)�nanriz1e1000 - 1e1000)rrrrrl�floatr>s&r�test_nan�UnparseTestCase.test_nanOs?������I�I�c�k�k�#�,�,�U�5�\�"B�C�D��I�I�'�(�	
r&c�p�UO[Q22UO[Q22P!)�i�l����)rrXr>s&r�test_min_int�UnparseTestCase.test_min_intUs&��� � ��Z��1�� � ��Z��1r&c��UOQ2UOQ2UOQ2UOQ2P!)�7jz-7j�0jz-0jr=r>s&r�test_imaginary_literals�'UnparseTestCase.test_imaginary_literalsYs:��� � ��&�� � ��'�� � ��&�� � ��'r&c�*�UOQ2P!)z(lambda: int)()r=r>s&r�test_lambda_parentheses�'UnparseTestCase.test_lambda_parentheses_���� � �!2�3r&c�L�UOQ2UOQ2P!)z
1 < 4 <= 5za is b is c is not dr=r>s&r�test_chained_comparisons�(UnparseTestCase.test_chained_comparisonsbs��� � ��.�� � �!7�8r&c��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2P!)z
def f(): passzdef f(a): passzdef f(b = 2): passzdef f(a, b): passzdef f(a, b = 2): passzdef f(a = 5, b = 2): passzdef f(*, a = 1, b = 2): passzdef f(*, a = 1, b): passzdef f(*, a, b = 2): passz&def f(a, b = None, *, c, **kwds): passz'def f(a=2, *args, c=5, d, **kwds): passzdef f(*args, **kwargs): passr=r>s&r�test_function_arguments�'UnparseTestCase.test_function_argumentsfs���� � ��1�� � �!1�2�� � �!5�6�� � �!4�5�� � �!8�9�� � �!<�=�� � �!?�@�� � �!;�<�� � �!;�<�� � �!I�J�� � �!J�K�� � �!?�@r&c�2�UO[2P!r")r�relative_importr>s&r�test_relative_import�$UnparseTestCase.test_relative_importt���� � ��1r&c�2�UO[2P!r")r�nonlocal_exr>s&r�
test_nonlocal�UnparseTestCase.test_nonlocalw���� � ��-r&c�2�UO[2P!r")r�
raise_fromr>s&r�test_raise_from�UnparseTestCase.test_raise_fromzr�r&c�*�UOQ2P!)zb'123'r=r>s&r�
test_bytes�UnparseTestCase.test_bytes}s��� � ��*r&c��UOQ2UOQ2UOQ2UOQ2UOQ2P!)zdef f(a : int): passzdef f(a: int = 5): passzdef f(*args: [int]): passzdef f(**kwargs: dict): passzdef f() -> None: passr=r>s&r�test_annotations� UnparseTestCase.test_annotations�sM��� � �!7�8�� � �!:�;�� � �!<�=�� � �!>�?�� � �!8�9r&c�*�UOQ2P!)z{'a', 'b', 'c'}r=r>s&r�test_set_literal� UnparseTestCase.test_set_literal�r�r&c
���UO[O[O[O,Q522[OQ22P!))�eltsz{*()})rrrr�Setr>s&r�test_empty_set�UnparseTestCase.test_empty_set�s:������I�I�c�k�k�#�'�'�r�"2�3�4��I�I�g��	
r&c�*�UOQ2P!)z{x for x in range(5)}r=r>s&r�test_set_comprehension�&UnparseTestCase.test_set_comprehension�s��� � �!8�9r&c�*�UOQ2P!)z{x: x*x for x in range(10)}r=r>s&r�test_dict_comprehension�'UnparseTestCase.test_dict_comprehension�s��� � �!>�?r&c�n�UOQ2UOQ2UOQ2P!)z{**x for x in ()}z{**x for x in range(10)}z[*x for x in ()]r=r>s&r�!test_dict_comprehension_unpacking�1UnparseTestCase.test_dict_comprehension_unpacking�s/��� � �!4�5�� � �!;�<�� � �!3�4r&c�2�UO[2P!r")r�class_decoratorr>s&r�test_class_decorators�%UnparseTestCase.test_class_decorators�r�r&c�*�UOQ2P!)z(class A(metaclass=type, *[], **{}): passr=r>s&r�test_class_definition�%UnparseTestCase.test_class_definition�s��� � �!K�Lr&c�\�UO[2UO[2P!r")r�elif1�elif2r>s&r�
test_elifs�UnparseTestCase.test_elifs�s��� � ��'�� � ��'r&c�2�UO[2P!r")r�try_except_finallyr>s&r�test_try_except_finally�'UnparseTestCase.test_try_except_finally�s��� � �!3�4r&c�2�UO[2P!r")r�try_except_star_finallyr>s&r�test_try_except_star_finally�,UnparseTestCase.test_try_except_star_finally�s��� � �!8�9r&c��UOQ2UOQ2UOQ2UOQ2P!)za, *b, c = seqza, (*b, c) = seqza, *b[0], c = seqza, *(b, c) = seqr=r>s&r�test_starred_assignment�'UnparseTestCase.test_starred_assignment�s>��� � �!1�2�� � �!3�4�� � �!4�5�� � �!3�4r&c�2�UO[2P!r")r�with_simpler>s&r�test_with_simple� UnparseTestCase.test_with_simple�r�r&c�2�UO[2P!r")r�with_asr>s&r�test_with_as�UnparseTestCase.test_with_as�s��� � ��)r&c�2�UO[2P!r")r�with_two_itemsr>s&r�test_with_two_items�#UnparseTestCase.test_with_two_items�s��� � ��0r&c�L�UOQ2UOQ2P!)z{**{'y': 2}, 'x': 1}z{**{'y': 2}, **{'x': 1}}r=r>s&r�test_dict_unpacking_in_dict�+UnparseTestCase.test_dict_unpacking_in_dict�s ��� � �!<�=�� � �!@�Ar&c�8�UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2UOQ2UOQ
2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)za[i]za[i,]za[i, j]za[(*a,)]za[*a]za[b, *a]za[*a, c]za[b, *a, c]�	a[*a, *a]za[b, *a, *a]za[*a, b, *a]za[*a, *a, b]za[b, *a, *a, c]z	a[(a:=b)]za[(a:=b,c)]�a[()]za[i:j]za[:j]za[i:]za[i:j:k]za[:j:k]za[i::k]za[i:j,]z	a[i:j, k]r=r>s&r�test_slices�UnparseTestCase.test_slices�sS��� � ��(�� � ��)�� � ��+�� � ��,�� � ��)�� � ��,�� � ��,�� � ��/�� � ��-�� � ��0�� � ��0�� � ��0�� � �!2�3�� � ��-�� � ��/�� � ��)�� � ��*�� � ��)�� � ��)�� � ��,�� � ��+�� � ��+�� � ��+�� � ��-r&c
��UO[OP[OQ[O2Q5Q52P!)N�XrR)�exc�cause)rr�Raiser^r_r>s&r�test_invalid_raise�"UnparseTestCase.test_invalid_raise�s,�����3�9�9��S�X�X��#�(�(�*�5U�V�Wr&c	���UO[O[OQ[O2Q5[O
QQ5,Q52P!)�testrRrirZ)rr�	JoinedStrr^r_rlr>s&r�test_invalid_fstring_value�*UnparseTestCase.test_invalid_fstring_value�sA������M�M��H�H��C�H�H�J�7��L�L�v�.��
�	
r&c
��UO[O[O[OQQ5PPQ52Q2P!)z\\ri)rWrY�format_specz{'\\\\'})r)rr�FormattedValuerlr>s&r�test_fstring_backslash�&UnparseTestCase.test_fstring_backslash�s@���������.�.�&)�l�l��&@�+-�,0���*�
	+r&c�T�UO[OPQ52P!)Nri)rr�	YieldFromr>s&r�test_invalid_yield_from�'UnparseTestCase.test_invalid_yield_from�s�����3�=�=�t�4�5r&c�Z�[OQ[OQQ5,Q5oUO[OU2Q2[OQ[OQQ5,PQ5oUO[OU2Q2P!)�modrc)�name)�module�nameszfrom mod import x)rr
�level)r�
ImportFrom�aliasr)r)r�trees& r�test_import_from_level_none�+UnparseTestCase.test_import_from_level_none�sp���~�~�U�3�9�9�#�3F�2G�H��������T�*�,?�@��~�~�U�3�9�9�#�3F�2G�t�T��������T�*�,?�@r&c�J�QoSFDoUOQUQ02J	P!)�this ends with double quote"z''')
rz"this includes a """triple quote"""�
z\r�	z\t�
z\nz	
\r	\t
\nz$""">>> content = """blabla""" <<<"""z	foo\n\x00z' \'\'\'""" ""\'\' \'u🐍⛎𩸽üéş^\\X\\BB⟿r=)r�
docstrings�	docstrings&  r�test_docstrings�UnparseTestCase.test_docstrings�s,��
�
�$�I��$�$�s�9�+�S�%9�:�$r&c��[OoUOU[O[O[O
QQ52,22Q2UOU[O[O[O
QQ52,22Q2P!)�riz(1,)z	(1, 2, 3))r)rr��)r�fix_missing_locationsr*�Module�Exprrl)r�locss& r�test_constant_tuples�$UnparseTestCase.test_constant_tuplessz���(�(��� � �����S�X�X�c�l�l��&>�?�@�A�B�F�	L�� � �����S�X�X�c�l�l��&C�D�E�F�G��	
r&c�B�QFDoUOUQQ5J	P!)�	() -> int�	func_type��mode)r'z(int, int) -> intz=(Callable[complex], More[Complex(call.to_typevar())]) -> Noner=)r�
function_types& r�test_function_type�"UnparseTestCase.test_function_types#��
�M�

�$�$�]��$�E�
r&c�B�QFDoUOUP	Q5J	P!)�
a = 5 # type:��
type_comments)r/za = 5 # type: intza = 5 # type: int and morez!def x(): # type: () -> None
	passz.def x(y): # type: (int) -> None and more
	passz'async def x(): # type: () -> None
	passz4async def x(y): # type: (int) -> None and more
	passzfor x in y: # type: int
	passz#async for x in y: # type: int
	passzwith x(): # type: int
	passz!async with x(): # type: int
	passr=�r�	statements& r�test_type_comments�"UnparseTestCase.test_type_commentss#��
�I�
�$�$�Y�d�$�C�
r&c�B�QFDoUOUP	Q5J	P!)�a = 5 # type: ignorer0)
r7za = 5 # type: ignore and morezdef x(): # type: ignore
	passz'def x(y): # type: ignore and more
	passz#async def x(): # type: ignore
	passz-async def x(y): # type: ignore and more
	passz for x in y: # type: ignore
	passz&async for x in y: # type: ignore
	passzwith x(): # type: ignore
	passz$async with x(): # type: ignore
	passr=r2s& r�test_type_ignore� UnparseTestCase.test_type_ignore.s#��
�I�
�$�$�Y�d�$�C�
r&c	��UOQQQ5UOQQQ5QoSFD%oSFDoUOUQU0QQ5J	J'	P!)zi = 1; 'expr'; raise Exception�singler)z i: int = 1; j: float = 0; k += lz; )z'expr'z(i := 1)z
import foozfrom foo import barzi = 1zi += 1z
i: int = 1zreturn i�pass�break�continuezdel izassert izglobal iz
nonlocal jzawait izyield izyield from izraise iztype t[T] = ...�i�r*)r�
combinable�a�bs&   r�#test_unparse_interactive_semicolons�3UnparseTestCase.test_unparse_interactive_semicolons=sd��� � �!A�� �Q�� � �!C�(� �S�
�
�.�A����(�(�A�3�b����8�(�D� �r&c��UOQQQQ5UOQQQQ5UOQQQQ5P!)z$if i:
 'expr'
else:
 raise Exceptionz*if i:
    'expr'
else:
    raise Exceptionr;r)zP@decorator1
@decorator2
def func():
 'docstring'
 i = 1; 'expr'; raise Exceptionz`@decorator1
@decorator2
def func():
    """docstring"""
    i = 1
    'expr'
    raise ExceptionzO@decorator1
@decorator2
class cls:
 'docstring'
 i = 1; 'expr'; raise Exceptionz_@decorator1
@decorator2
class cls:
    """docstring"""
    i = 1
    'expr'
    raise Exceptionr@r>s&r�$test_unparse_interactive_integrity_1�4UnparseTestCase.test_unparse_interactive_integrity_1\sZ��� � �5�;��	!�	
�
	
� � �b�x��	!�	
�
	
� � �a�w��	!�	
r&c���,QMQMQMQMQMQMQMQMQMQ	MQ
MQMQMQ
MQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMFDoUOUQ Q!5J	P!)"zdef x():
    passzdef x(y):
    passzasync def x():
    passzasync def x(y):
    passzfor x in y:
    passzasync for x in y:
    passzwith x():
    passzasync with x():
    pass�def f():
    passzdef f(a):
    passzdef f(b=2):
    passzdef f(a, b):
    passzdef f(a, b=2):
    passzdef f(a=5, b=2):
    passzdef f(*, a=1, b=2):
    passzdef f(*, a=1, b):
    passzdef f(*, a, b=2):
    passz(def f(a, b=None, *, c, **kwds):
    passz+def f(a=2, *args, c=5, d, **kwds):
    passz def f(*args, **kwargs):
    passz)class cls:

    def f(self):
        passz,class cls:

    def f(self, a):
        passz.class cls:

    def f(self, b=2):
        passz/class cls:

    def f(self, a, b):
        passz1class cls:

    def f(self, a, b=2):
        passz3class cls:

    def f(self, a=5, b=2):
        passz6class cls:

    def f(self, *, a=1, b=2):
        passz4class cls:

    def f(self, *, a=1, b):
        passz4class cls:

    def f(self, *, a, b=2):
        passzBclass cls:

    def f(self, a, b=None, *, c, **kwds):
        passzEclass cls:

    def f(self, a=2, *args, c=5, d, **kwds):
        passz:class cls:

    def f(self, *args, **kwargs):
        passr;r)r@r2s& r�$test_unparse_interactive_integrity_2�4UnparseTestCase.test_unparse_interactive_integrity_2nsm��!
� �!
�!�!
�
'�!
�
(�	!
�

$�!
�
*�
!
�
"�!
�
(�!
�
!�!
�
"�!
�
$�!
�
%�!
�
'�!
�
)�!
�
,�!
� 
*�!!
�"
*�#!
�$
8�%!
�&
;�'!
�(
0�)!
�*
;�+!
�,
>�-!
�.
@�/!
�0
A�1!
�2
C�3!
�4
E�5!
�6
H�7!
�8
F�9!
�:
F�;!
�<
T�=!
�>
W�?!
�@
L�A!
�I�D
�$�$�Y�X�$�>�E!
r&c�f�QFD(oUQ*oUQ*oUOV#QQ5J*	P!)�def x():z	
 i=1;j=2z
    i = 1
    j = 2r;r))rNz	def x(y):zasync def x():zasync def x(y):zfor x in y:zasync for x in y:z	with x():zasync with x():zdef f():z	def f(a):zdef f(b=2):zdef f(a, b):zdef f(a, b=2):zdef f(a=5, b=2):zdef f(*, a=1, b=2):zdef f(*, a=1, b):zdef f(*, a, b=2):zdef f(a, b=None, *, c, **kwds):z"def f(a=2, *args, c=5, d, **kwds):zdef f(*args, **kwargs):r@)rr3�src�outs&   r�$test_unparse_interactive_integrity_3�4UnparseTestCase.test_unparse_interactive_integrity_3�s8��
�I�,�l�*�C��6�6�C��$�$�S�H�$�=�3
r&r0)>r1r2r3r4r?rBrGrJrNr`rmrprsrvrzr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr$r,r4r8rDrGrKrQr6r7r8s@rr;r;�s0����
�*?�8�F�
0�

�@
�D+�
0�,�+�-�6�1�-�
�2�(�4�9�A�2�.�-�+�:�4�
�:�@�5�
2�M�(�5�:�5�.�*�1�B�
.�6X�
�+�6�A�;�(
�F�D� 
D�E�>
�$#?�J>�>r&r;c�z`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsUsP!)�CosmeticTestCase�zATest if there are cosmetic issues caused by unnecessary additionsc��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2UOQ2UOQ
2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)z(a := b)zawait xz
x if x else yzlambda x: xz1 + 1z	1 + 2 / 3z(1 + 2) / 3z(1 + 2) * 3 + 4 * (5 + 2)z(1 + 2) * 3 + 4 * (5 + 2) ** 2z~xzx and yz
x and y and zzx and (y and x)z(x and y) and zz(x ** y) ** z ** qzx >> yzx << yzx >> y and x >> zzx + y - z * q ^ t ** kzP * V if P and V else n * R * Tz"lambda P, V, n: P * V == n * R * Tzflag & (other | foo)z
not x == yzx == (not y)zyield xzyield from xzcall((yield x))zreturn x + (yield x)r@r>s&r�test_simple_expressions_parens�/CosmeticTestCase.test_simple_expressions_parens�s���� � ��,�� � ��+�� � ��1�� � ��/�� � ��)�� � ��-�� � ��/�� � �!<�=�� � �!A�B�� � ��&�� � ��+�� � ��1�� � �!2�3�� � �!2�3�� � �!5�6�� � ��*�� � ��*�� � �!4�5�� � �!9�:�� � �!B�C�� � �!E�F�� � �!7�8�� � ��.�� � ��0�� � ��+�� � ��0�� � �!2�3�� � �!7�8r&c�\�UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2P!)
�class X:
    passzclass X(A):
    passzclass X(A, B, C, D):
    passzclass X(x=y):
    passzclass X(metaclass=z):
    passzclass X(x=y, z=d):
    passzclass X(A, x=y):
    passzclass X(A, **kw):
    passzclass X(*args):
    passz"class X(*args, **kwargs):
    passr@r>s&r�test_class_bases_and_keywords�.CosmeticTestCase.test_class_bases_and_keywords�s���� � �!5�6�� � �!8�9�� � �!A�B�� � �!:�;�� � �!B�C�� � �!?�@�� � �!=�>�� � �!>�?�� � �!<�=�� � �!F�Gr&c��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)rEz*f'-{f'''*{f"""+{f".{f'{x}'}."}+"""}*'''}-'z/f'-{f'*{f'''+{f""".{f"{f'{x}'}"}."""}+'''}*'}-'rFzf'{x}\n'zf"{'\n'}\n"zf"{f'{x}\n'}\n"r@r>s&rr?�CosmeticTestCase.test_fstrings�sj��� � �!R�S�� � �!Y�Z�� � �!`�a�� � �!6�7�� � ��-�� � �!4�5�� � �!8�9r&c�f�Qo[FD"oSFDoUOUU02J	J$	P!)�"""simple doc string""")
r`z7"""A more complex one
            with some newlines"""z,"""Foo bar baz

            empty newline"""z"""With some 	"""z"""Foo "bar" baz """z"""\r"""z""""""z	"""'''"""z"""''''''"""u""""🐍⛎𩸽üéş^\\X\\BB⟿"""z"""end in single 'quote'"""z'''end in double "quote"'''z#"""almost end in double "quote".""")�docstring_prefixesr*)rr�prefixrs&   rr� CosmeticTestCase.test_docstrings�s9��
�
�&)�(�F�'�	��(�(�F�8�I�;�)?�@�(�)r&c��Qo[FD5oSFD+oUU0oUOU2UOU2J-	J7	P!)�a = """false""")rez("""false""" + """unless its optimized"""z1 + 1
"""false"""z"f"""no, top level but f-fstring""")rarr.)r�docstrings_negativerb�negativerOs&    r�test_docstrings_negative_cases�/CosmeticTestCase.test_docstrings_negative_cases�sO��
��)�(�F�/�� ���
�+���(�(��-��-�-�c�2�0�)r&c��QFDoUOUQ02J	QFDoUOUQ02J	P!)�+�1z 1)rk�-�~)�notr@)rrbs& r�test_unary_op_factor�%CosmeticTestCase.test_unary_op_factors>��%�F��$�$��x�q�\�2�&��F��$�$��x�r�]�3�r&c���UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2UOQ2UOQ
2P!)r�za[1]za[1, 2]za[*a,]za[1, *a]za[*a, 2]za[1, *a, 2]r�za[1, *a, *a]za[*a, 1, *a]za[*a, *a, 1]za[1, *a, *a, 2]z
a[1:2, *a]z
a[*a, 1:2]r@r>s&rr��CosmeticTestCase.test_slicess���� � ��)�� � ��(�� � ��+�	
� � ��*�� � ��,�� � ��,�� � ��/�� � ��-�� � ��0�� � ��0�� � ��0�� � �!2�3�� � ��.�� � ��.r&c��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)zlambda: somethingzfour = lambda: 2 + 2zlambda x: x * 2zsquare = lambda n: n ** 2zlambda x, y: x + yzadd = lambda x, y: x + yz lambda x, y, /, z, q, *, u: Nonezlambda x, *y, **z: Noner@r>s&r�test_lambda_parameters�'CosmeticTestCase.test_lambda_parameters)sz��� � �!4�5�� � �!7�8�� � �!2�3�� � �!<�=�� � �!5�6�� � �!;�<�� � �!C�D�� � �!:�;r&c���QFDSvqQFDGoUOVQ59^tt^2UOUOUQ52PPP2JI	JU	P!)%fhJb9h)�single assignment)�source_type�target)rz))rxz{target} = foo)zmultiple assignmentz{target} = {target} = bar)zfor loopzfor {target} in foo:
    pass)zasync for loopz#async for {target} in foo:
    pass)rBza,za, bza, *b, cza, (b, c), dza, (b, c, d), *eza, (b, *c, d), eza, (b, *c, (d, e), f), gz[a]z[a, b]z
[a, *b, c]z[a, [b, c], d]z[a, [b, c, d], *e]z[a, [b, *c, d], e]z[a, [b, *c, [d, e], f], g]za, [b, c], dz[a, b, (c, d), (e, f)]za, b, [*c], d, e)rr*�format)rry�sourcerzs&   r�test_star_expr_assign_target�-CosmeticTestCase.test_star_expr_assign_target3s_��$
��K���(�\�\�k�\�I�I��,�,�V�]�]�&�]�-I�J�J�I�)�
$
�4J�I�I�s�"A
�A/�'A/c��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)z() = []z[] = ()z'() = [a] = c, = [d] = e, f = () = g = hz
a = b = c = dza, b = c, d = e, f = gz[a, b] = [c, d] = [e, f] = gza, b = [c, d] = e, f = gr@r>s&r�%test_star_expr_assign_target_multiple�6CosmeticTestCase.test_star_expr_assign_target_multipleQsh��� � ��+�� � ��+�� � �!J�K�� � ��1�� � �!9�:�� � �!?�@�� � �!;�<r&c�\�UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2P!)
zf"'''{1}\"\"\"" zf"'''{1}""\"" zf'"""{1}''' zf'"""{1}""\"' zf"'''{"\n"}""\"" zf'"""{"\n"}''' zf'"""{"\n"}""\"' zf'''"""''\'{"\n"}''' zf'''"""''\'{"\n\"'"}''' z'f'''"""''\'{"""\n\"'''""" '''\n'''}''' r=r>s&r�test_multiquote_joined_string�.CosmeticTestCase.test_multiquote_joined_stringZs���� � �!;�<�� � �!6�7�� � �!4�5�� � �!7�8�� � �!:�;�� � �!8�9�� � �!;�<�� � �!?�@�� � �!C�D�� � �!U�Vr&c���]PHoUOQ2oUO[U29^tt^2UO	Q2PPP2UO	Q2UO	Q2UO[U29^tt^2UO	Q2PPP2UO	Q2UO	Q2P!)%fhK�9h)%fhKG9h)�z�"\ " is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\ "? A raw string is also an option.z
f"{x:\ }" z
f"{x:\n}" zf"{x:\\ }" zf"{x:\\\ }" zf"{x:\\\n}" z
f"{x:\\\\ }" )�re�escape�assertWarnsRegex�
SyntaxWarningr)rr��msgs&  r�test_backslash_in_format_spec�.CosmeticTestCase.test_backslash_in_format_spechs�����i�i�P�Q���
"�
"�=�#�
6�
6��$�$�%6�7�7�� � �!2�3�� � �!4�5�
�
"�
"�=�#�
6�
6��$�$�%:�;�7�� � �!6�7�� � �!8�9�7�
6��7�
6�s#�C
�C �
C	�C	� C0	�)C0	c���UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2P!)z	f"{x:'}" z
f"{x:\'}" zf"{x:\\'}" zf'\'{x:"}' zf'\'{x:\"}' z
f'\'{x:\\"}' r=r>s&r�test_quote_in_format_spec�*CosmeticTestCase.test_quote_in_format_specys[��� � ��1�� � �!2�3�� � �!4�5�� � �!3�4�� � �!5�6�� � �!7�8r&c��UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ2UOQ	2UOQ
2UOQ2P!)ztype A = intztype A[T] = intztype A[T: int] = intztype A[T = int] = intztype A[T: int = int] = intztype A[**P] = intztype A[**P = int] = intztype A[*Ts] = intztype A[*Ts = int] = intztype A[*Ts = *int] = intz6def f[T: int = int, **P = int, *Ts = *int]():
    passz8class C[T: int = int, **P = int, *Ts = *int]():
    passr=r>s&r�test_type_params�!CosmeticTestCase.test_type_params�s���� � ��0�� � �!2�3�� � �!7�8�� � �!8�9�� � �!=�>�� � �!4�5�� � �!:�;�� � �!4�5�� � �!:�;�� � �!;�<�� � �!Z�[�� � �!\�]r&r0)r1r2r3r4�__doc__rWr[r?rrhrpr�rur}r�r�r�r�r�r6r7r8s@rrTrT�sY����K�9�<
H�:�A�03�$4�/�&<�K�<=�W�:�"9�^�^r&rTc�\`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsUsP!)
�ManualASTCreationTestCase�zJTest that AST nodes created without a type_params field unparse correctly.c���[OQ,,[O2,,Q5o[OU2UO	[O
U2Q2P!)r�)r�bases�keywordsrf�decorator_listrZ)r�ClassDef�Passr r)r�rrs& r�
test_class�$ManualASTCreationTestCase.test_class�sI���|�|��B��3�8�8�:�,�_a�b���!�!�$�'�������T�*�,@�Ar&c
�
�[OQ,,[O2,,[OQ2,Q5o[OU2UO[OU2Q2P!)r��T)rr�r�rfr��type_paramszclass X[T]:
    pass)rr�r��TypeVarr r)rr�s& r�test_class_with_type_params�5ManualASTCreationTestCase.test_class_with_type_params�sZ���|�|��B��3�8�8�:�,�_a�*-�+�+�c�*:�);�=���!�!�$�'�������T�*�,C�Dr&c
��[OQ[O,,P,,P,Q5[O2,,PQ5o[OU2UO[OU2Q2P!)�f��posonlyargsre�vararg�
kwonlyargs�kw_defaults�kwarg�defaults�rrerfr��returnsrJ)r�FunctionDefrkr�r r)rr�s& r�
test_function�'ManualASTCreationTestCase.test_function�sj���������2�B�t�PR�`b�jn�y{�|��(�(�*����
��	�!�!�$�'�������T�*�,@�Ar&c
�@�[OQ[O,,P,,P,Q5[O2,,P[OQ2,Q5o[O
U2UO
[OU2Q2P!)r�r�r��rrerfr�r�r�zdef f[T]():
    pass)rr�rkr�r�r r)rr�s& r�test_function_with_type_params�8ManualASTCreationTestCase.test_function_with_type_params�sy���������2�B�t�PR�`b�jn�y{�|��(�(�*�������S�)�*�

��	�!�!�$�'�������T�*�,C�Dr&c��[OQ[O,,P,,P,Q5[O2,,P[OQ[O
Q[O2Q5Q5,Q5o[OU2UO[OU2Q2P!)r�r�r��int)rT)�boundr�zdef f[T: int]():
    pass)
rr�rkr�r�r^r_r r)rr�s& r�(test_function_with_type_params_and_bound�BManualASTCreationTestCase.test_function_with_type_params_and_bound�s����������2�B�t�PR�`b�jn�y{�|��(�(�*�������S�����C�H�H�J�0O�P�Q�

��	�!�!�$�'�������T�*�,H�Ir&c�\�[OQ[O2[O2,[OQ[O
]Q5Q5[OQ[O[O
]Q5[O2Q5Q5[OQ[O
]Q5Q5,Q5o[OU2UO[OU2Q2P!)	r�r�ri��
default_value�Ts�rWrT�P�rrerfr�z+def f[T = 1, *Ts = *1, **P = 1]():
    pass)
rr�rkr�r�rl�TypeVarTuple�Starredr_�	ParamSpecr r)rr�s& r�*test_function_with_type_params_and_default�DManualASTCreationTestCase.test_function_with_type_params_and_default�s������������(�(�*�����C�s�|�|�!�/D�E�� � ��S�[�[�s�|�|�Z[�G\�be�bj�bj�bl�5m�n��
�
�c����A�1F�G��		
��	�!�!�$�'�������T�*�,Z�[r&c
��[OQ[O,,P,,P,Q5[O2,,PQ5o[OU2UO[OU2Q2P!)r�r�r�zasync def f():
    pass)r�AsyncFunctionDefrkr�r r)rr�s& r�test_async_function�-ManualASTCreationTestCase.test_async_function�sl���#�#�����2�B�t�PR�`b�jn�y{�|��(�(�*����
��	�!�!�$�'�������T�*�,F�Gr&c
�@�[OQ[O,,P,,P,Q5[O2,,P[OQ2,Q5o[O
U2UO
[OU2Q2P!)r�r�r�r�zasync def f[T]():
    pass)rr�rkr�r�r r)rr�s& r�$test_async_function_with_type_params�>ManualASTCreationTestCase.test_async_function_with_type_params�s{���#�#�����2�B�t�PR�`b�jn�y{�|��(�(�*�������S�)�*�

��	�!�!�$�'�������T�*�,I�Jr&c�\�[OQ[O2[O2,[OQ[O
]Q5Q5[OQ[O[O
]Q5[O2Q5Q5[OQ[O
]Q5Q5,Q5o[OU2UO[OU2Q2P!)	r�r�rir�r�r�r�r�z1async def f[T = 1, *Ts = *1, **P = 1]():
    pass)
rr�rkr�r�rlr�r�r_r�r r)rr�s& r�0test_async_function_with_type_params_and_default�JManualASTCreationTestCase.test_async_function_with_type_params_and_default�s����#�#�������(�(�*�����C�s�|�|�!�/D�E�� � ��S�[�[�s�|�|�Z[�G\�be�bj�bj�bl�5m�n��
�
�c����A�1F�G��		
��	�!�!�$�'�������T�*�,`�ar&r0)r1r2r3r4r�r�r�r�r�r�r�r�r�r�r6r7r8s@rr�r��sD����T�B�
E�	B�
E�
J�\�	H�
K�b�br&r�c�`�\sQsQsnQs\O\2OQ*s	\	\	Q*1s
.QlsPs\
Q2sQsQsUsP!)	�DirectoryTestCase�z:Test roundtrip behaviour on all files in Lib and Lib/test.z..r�c
�8�UOd
UO!UOTTt,tFDOoUOQ2FD6oUOO	Q2%cJ&UO2MJ8	JQ	ooo[OOQ2%faSTt.tFD"oUOUO7fJ UjJ$	oo[[OU]
22o[V4*2oV0mU!ttoohttoh)Nz*.py�bad�cpu)�_files_to_test�test_directories�globr�
startswith�resolver��support�is_resource_enabled�run_always_files�set�random�sample�list)�cls�	directory�item�items�tests_to_run_alwayss&    r�
files_to_test�DirectoryTestCase.files_to_tests������)��%�%�%�!�1�1�
�1�	�!���v�.���9�9�'�'��.�
�D�L�L�N�.�
�1�	�
��|�|�/�/��6�6�49�#F�E�D�#'�9�9��0D�0D�#D�$(�4�E��#F���
�
�e�R�0�1�E���4�5�E�#�����/
��#Fs�:D�)D�,D�Dc��[O29^tt^2[OQ[2UO	2FD~o[
OO%c[QUO202UOUQ59^tt^2[U2oUOU2PPP2J�	PPP2P!)%fhJ�9h)%fhP!9h)�ignorezTesting )r)
�warnings�catch_warnings�simplefilterr�r�r�r��verbose�print�absoluterr	r)rr�r|s&  r�
test_files�DirectoryTestCase.test_files!s���
�
$�
$�
&�
&��!�!�(�M�:��*�*�,���<�<�'�'�'��H�T�]�]�_�$5�6�7��\�\�4�\�0�0�(��.�F��,�,�V�4�1�0�	-�'�
&�1�0�0��'�
&�
&�s6�AC,�/6C,�%C
�C,�C)�!C)�#	C,�,C=	�5C=	r0>�test_ast.py�
test_patma.py�test_syntax.py�test_compile.py�test_fstring.py�test_grammar.py�test_tstring.py�test_tokenize.py�test_type_alias.py�test_asdl_parser.py�test_type_params.py)r1r2r3r4r��pathlib�Path�__file__�parent�lib_dirr�r�r��classmethodr�r�r6r7r8s@rr�r��s\����D��l�l�8�$�+�+�d�2�G���6�!1�2��?��
�N�����<
5�
5r&r��__main__)�zclass foo:
    zdef foo():
    zasync def foo():
    )"r��unittest�test.supportr�rr�rr�r�test.support.ast_helperrr	ryr}r�r�r�r�r�r�r�r�r�r�r�ra�TestCaserr;rTr�r�r1�mainr0r&r�<module>rs�������
���
�0�����
���	���
���	��	��������
��
��
��.�,�� 1� 1�.�6M>�k�M>�`^^�{�^^�Bbb�� 1� 1�bb�J55��55�p�z���M�M�O�r&

Youez - 2016 - github.com/yon3zu
LinuXploit