+
    Bi                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHt ^ RIHtHt Rt ! R R]P"                  4      t]R8X  d   ]P&                  ! 4        R# R# )	    N)support)temp_cwd)assert_python_failureassert_python_okzglobal variablec                     a  ] tR t^ t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR t]P.                  ! ]P2                  R4      R 4       t]P.                  ! ]P2                  R4      R 4       tR tR tR tR tR t R t!R t"R t#R t$R t%R  t&R! t'R" t(R# t)R$ t*R% t+R& t,R' t-R( t.R) t/R* t0R+ t1R, t2R- t3R. t4R/ t5R0 t6R1 t7R2 t8R3 t9R4 t:R5 t;R6 t<R7 t=R8 t>R9 t?R: t@R; tAR< tBR= tCR> tDR? tER@ tFRA tGRB tHRC tIRD tJRE tKRF tLRG tMRH tNRI tORJ tPRK tQRL tRRM tSRN tTRO tURP tVRQ tWRR tXRS tYRT tZRU t[RV t\RW t]RX t^RY t_RZ t`R[ taR\tbV tcR]# )^TestCasec           
        V FS  pV P                  VR 7      ;_uu_ 4        V P                  W4      ;_uu_ 4        \        V4       RRR4       RRR4       KU  	  R#   + '       g   i     L; i  + '       g   i     K}  ; i)strN)subTestassertRaisesRegexeval)selfexception_typeregexerror_stringsr   s   &&&& (/usr/lib/python3.14/test/test_fstring.pyassertAllRaiseTestCase.assertAllRaise!   sV     C#&&++NBBI C '& !BB '&&s"   A/AA/A,'A//B c                F    ! R  R4      pV! 4       pV! 4       p\         P                  ! R V4      Vn        V P                  V \	        V4      4       V P                  V R4       V P                  \	        V4      \	        V4      4       V P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  \        V4      P                  VR4      R4       V P                  \        V4      P                  VR4      R4       R# )c                   &   a  ] tR t^)t o R tRtV tR# )(TestCase.test__format__lookup.<locals>.Xc                    R # )class r   specs   &&r   
__format__3TestCase.test__format__lookup.<locals>.X.__format__*   s        r   N__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classdict__s   @r   Xr   )   s      r    r*   c                     R # )instancer   r   s   &&r   <lambda>/TestCase.test__format__lookup.<locals>.<lambda>2   s    :r    r    r,   N)types
MethodTyper   assertEqualformattype)r   r*   xys   &   r   test__format__lookupTestCase.test__format__lookup'   s    	 	 C C''(EqIA3+A3)F1I.
 	b)73b):6 	a++Ar2G<a++Ar2G<r    c                     ! R  R4      pV! 4       pRp\         P                  ! V4      p\        VRR4      pV P                  VP                  4       \        V4       V P                  VP                  4       R# )c                   ,   a  ] tR t^Dt o R tR tRtV tR# )TestCase.test_ast.<locals>.Xc                    R V n         R# )FNcalledr   s   &r   __init__%TestCase.test_ast.<locals>.X.__init__E   s	    #r    c                    R V n         ^# )Tr=   r?   s   &r   __call__%TestCase.test_ast.<locals>.X.__call__G   s    "r    r=   N)r"   r#   r$   r%   r@   rC   r&   r'   r(   s   @r   r*   r;   D   s     $ r    r*   
a = 10
f'{a * x()}'r/   execN)astparsecompileassertFalser>   rF   
assertTrue)r   r*   r5   exprtcs   &     r   test_astTestCase.test_astB   sh    	 	 C IIdOAr6" 	" 	Q 	!r    c                   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  VP                  ^ ,          P                  ^4       V P                  \        VP                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  4      \         P                  4       V P                  \        VP                  ^,          P                  P                  4      ^4       V P                  \        VP                  ^,          P                  P                  ^ ,          4      \         P                  4       V P                  VP                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^4       V P                  VP                  ^,          P                  P                  ^ ,          P                  ^4       VP                  ^,          P                  P                  ^ ,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      \         P                   4       V P                  \        VP"                  4      \         P$                  4       V P                  \        VP&                  4      \         P(                  4       V P                  VP                  ^4       V P                  VP                  P                  ^4       V P                  VP&                  P                  ^4       V P                  VP*                  ^4       V P                  VP                  P*                  ^4       V P                  VP&                  P*                  ^4       R# )rE   N)rG   rH   r2   r4   ModulelenbodyAssignlinenoExprvalue	JoinedStrvaluesFormattedValueBinOpleftNameopMultrightCall
col_offsetr   rL   rM   binops   &   r   test_ast_line_numbersTestCase.test_ast_line_numbersZ   s    IIdOa#**-QVVa(affQi#**5))1-affQi#((3affQioo.>QVVAY__334a8affQioo44Q78#:L:LM))1-//3//2991=q	&&q)//ecii0ejj)3884ehh2ekk*CHH5q)**A.++Q/))1-..2//3r    c                   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  \        VP                  ^ ,          P                  4      \         P                  4       V P                  VP                  ^ ,          P                  ^4       V P                  \        VP                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  4      \         P                  4       V P                  \        VP                  ^,          P                  P                  4      ^4       V P                  \        VP                  ^,          P                  P                  ^ ,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^ ,          P                  4      \        4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          P                  4      \        4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  VP                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^4       V P                  VP                  ^,          P                  P                  ^ ,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       VP                  ^,          P                  P                  ^,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                   4      \         P"                  4       V P                  \        VP$                  4      \         P&                  4       V P                  \        VP(                  4      \         P*                  4       V P                  VP                  ^4       V P                  VP                   P                  ^4       V P                  VP(                  P                  ^4       V P                  VP,                  ^4       V P                  VP                   P,                  ^4       V P                  VP(                  P,                  ^4       VP                  ^,          P                  P                  ^,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                   4      \         P"                  4       V P                  \        VP$                  4      \         P.                  4       V P                  \        VP(                  4      \         P*                  4       V P                  VP                  ^4       V P                  VP                   P                  ^4       V P                  VP(                  P                  ^4       V P                  VP,                  ^4       V P                  VP                   P,                  ^4       V P                  VP(                  P,                  ^4       R# )z8
f'no formatted values'
f'eggs {a * x()} spam {b + y()}'N)rG   rH   r2   r4   rR   rS   rT   rW   rX   rY   rV   rZ   Constantr   r[   r\   r]   r^   r_   r`   ra   rb   rc   Add)r   rL   rM   binop1binop2s   &    r   .test_ast_line_numbers_multiple_formattedvalues7TestCase.test_ast_line_numbers_multiple_formattedvaluesy   sw   $ IIdOa#**-QVVa(affQi#((3affQioo.>))1-affQi#((3affQioo.>QVVAY__334a8affQioo44Q78#,,GaffQioo44Q7==>DaffQioo44Q78#:L:LMaffQioo44Q78#,,GaffQioo44Q7==>DaffQioo44Q78#:L:LM))1-//3//2991=//2991=//2991=//2991=''*00fsyy1fkk*CHH5fii#((3fll+SXX6*++Q/,,a0**A.//300"5''*00fsyy1fkk*CHH5fii#''2fll+SXX6*++Q/,,a0**B///400"5r    c                   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  VP                  ^ ,          P                  ^4       V P                  \        VP                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  4      \         P                  4       V P                  \        VP                  ^,          P                  P                  4      ^4       V P                  \        VP                  ^,          P                  P                  ^ ,          4      \         P                  4       V P                  VP                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^4       V P                  VP                  ^,          P                  P                  ^ ,          P                  ^4       VP                  ^,          P                  P                  ^ ,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      \         P                   4       V P                  \        VP"                  4      \         P$                  4       V P                  \        VP&                  4      \         P                  4       V P                  VP                  ^4       V P                  VP                  P                  ^4       V P                  VP&                  P                  ^4       V P                  VP(                  ^4       V P                  VP                  P(                  ^4       V P                  VP&                  P(                  ^4       V P                  \        VP&                  P                  4      ^4       V P                  \        VP&                  P                  ^ ,          4      \         P*                  4       V P                  \        VP&                  P                  ^ ,          P                  4      \,        4       V P                  \        VP&                  P                  ^,          4      \         P                  4       V P                  \        VP&                  P                  ^,          4      \         P*                  4       V P                  \        VP&                  P                  ^,          P                  4      \,        4       V P                  VP&                  P                  ^ ,          P                  ^4       V P                  VP&                  P                  ^,          P                  ^4       V P                  VP&                  P                  ^,          P                  ^4       VP&                  P                  ^,          P                  pV P                  \        V4      \         P.                  4       V P                  VP                  ^4       V P                  VP(                  ^4       R# )z
a = 10
f'{a * f"-{x()}-"}'N)rG   rH   r2   r4   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rc   ri   r   rb   )r   rL   rM   re   calls   &    r   test_ast_line_numbers_nested%TestCase.test_ast_line_numbers_nested   si    IIdOa#**-QVVa(affQi#**5))1-affQi#((3affQioo.>QVVAY__334a8affQioo44Q78#:L:LM))1-//3//2991=q	&&q)//ecii0ejj)3884ehh2ekk*CMM:q)**A.++Q/))1-..2//3U[[//0!4ekk0034cllCekk00399:C@ekk0034c6H6HIekk0034cllCekk00399:C@++A.55q9++A.55q9++A.55q9{{!!!$**dSXX.a("-r    c                   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  VP                  ^ ,          P                  ^4       V P                  \        VP                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  4      \         P                  4       V P                  \        VP                  ^,          P                  P                  4      ^4       V P                  \        VP                  ^,          P                  P                  ^ ,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          P                  4      \        4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          P                  4      \        4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  VP                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^4       V P                  VP                  ^,          P                  P                  ^ ,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       VP                  ^,          P                  P                  ^ ,          P                  pV P                  \        V4      \         P                   4       V P                  \        VP"                  4      \         P$                  4       V P                  \        VP&                  4      \         P(                  4       V P                  \        VP*                  4      \         P,                  4       V P                  VP                  ^4       V P                  VP"                  P                  ^4       V P                  VP*                  P                  ^4       V P                  VP.                  ^4       V P                  VP"                  P.                  ^4       V P                  VP*                  P.                  ^4       VP                  ^,          P                  P                  ^,          P                  pV P                  \        V4      \         P                   4       V P                  \        VP"                  4      \         P$                  4       V P                  \        VP&                  4      \         P(                  4       V P                  \        VP*                  4      \         P,                  4       V P                  VP                  ^4       V P                  VP"                  P                  ^4       V P                  VP*                  P                  ^4       V P                  VP.                  ^4       V P                  VP"                  P.                  ^4       V P                  VP*                  P.                  ^4       VP                  ^,          P                  P                  ^,          P                  pV P                  \        V4      \         P                   4       V P                  \        VP"                  4      \         P$                  4       V P                  \        VP&                  4      \         P(                  4       V P                  \        VP*                  4      \         P,                  4       V P                  VP                  ^4       V P                  VP"                  P                  ^4       V P                  VP*                  P                  ^4       V P                  VP.                  ^4       V P                  VP"                  P.                  ^4       V P                  VP*                  P.                  ^4       R# )z)
a = 10
f'{a * x()} {a * x()} {a * x()}'
N)rG   rH   r2   r4   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   ri   r   r\   r]   r^   r_   r`   ra   rb   rc   rd   s   &   r   *test_ast_line_numbers_duplicate_expression3TestCase.test_ast_line_numbers_duplicate_expression   s    IIdOa#**-QVVa(affQi#**5))1-affQi#((3affQioo.>QVVAY__334a8affQioo44Q78#:L:LMaffQioo44Q78#,,GaffQioo44Q7==>DaffQioo44Q78#:L:LMaffQioo44Q78#,,GaffQioo44Q7==>DaffQioo44Q78#:L:LM))1-//3//2991=//2991=//2991=//2991=//2991=q	&&q)//ecii0ejj)3884ehh2ekk*CHH5q)**A.++Q/))1-..2//3q	&&q)//ecii0ejj)3884ehh2ekk*CHH5q)**A.++Q/))2...3//4q	&&q)//ecii0ejj)3884ehh2ekk*CHH5q)**A.++Q/))2...3//4r    c                   \         P                  ! R 4      pV P                  \        VP                  4      ^4       V P                  VP                  ^ ,          P
                  ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  \        VP                  ^ ,          P                  4      \         P                  4       V P                  \        VP                  ^ ,          P                  P                  4      ^4       V P                  \        VP                  ^ ,          P                  P                  ^ ,          4      \         P                  4       V P                  \        VP                  ^ ,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^ ,          P                  P                  ^,          4      \         P                  4       VP                  ^ ,          P                  P                  w  r#pVP                  pV P                  \        V4      \         P                  4       V P                  VP
                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                   ^4       R# )z%f"Here is that pesky {xxx:.3f} again"N)rG   rH   r2   rS   rT   rV   r4   rW   rX   rY   rZ   ri   r[   r^   
end_linenorc   end_col_offset)r   rM   _rL   names   &    r   (test_ast_numbers_fstring_with_formatting1TestCase.test_ast_numbers_fstring_with_formatting  s   II=>QVVa())1-affQi#((3affQioo.>QVVAY__334a8affQioo44Q78#,,GaffQioo44Q78#:L:LMaffQioo44Q78#,,GVVAY__++
zzdSXX.a(!,"-,,b1r    c                d   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  VP                  ^ ,          P                  ^4       V P                  \        VP                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  4      \         P                  4       V P                  \        VP                  ^,          P                  P                  4      ^4       V P                  \        VP                  ^,          P                  P                  ^ ,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^ ,          P                  4      \        4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          4      \         P                  4       V P                  \        VP                  ^,          P                  P                  ^,          P                  4      \        4       V P                  VP                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^4       V P                  VP                  ^,          P                  P                  ^ ,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                  P                  ^,          P                  ^4       V P                  VP                  ^,          P                   ^ 4       V P                  VP                  ^,          P                  P                   ^ 4       V P                  VP                  ^,          P                  P                  ^ ,          P                   ^4       V P                  VP                  ^,          P                  P                  ^,          P                   ^4       V P                  VP                  ^,          P                  P                  ^,          P                   ^4       VP                  ^,          P                  P                  ^,          P                  pV P                  \        V4      \         P"                  4       V P                  \        VP$                  4      \         P&                  4       V P                  \        VP(                  4      \         P*                  4       V P                  \        VP,                  4      \         P.                  4       V P                  VP                  ^4       V P                  VP$                  P                  ^4       V P                  VP,                  P                  ^4       V P                  VP                   ^4       V P                  VP$                  P                   ^4       V P                  VP,                  P                   ^4       Rp\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       V P                  \        VP                  ^ ,          4      \         P                  4       V P                  \        VP                  ^ ,          P                  4      \         P                  4       V P                  \        VP                  ^ ,          P                  P                  4      ^4       V P                  \        VP                  ^ ,          P                  P                  ^,          4      \         P                  4       V P                  VP                  ^ ,          P                  ^4       V P                  VP                  ^ ,          P                  P                  ^4       V P                  VP                  ^ ,          P                  P                  ^ ,          P                  ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                  ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                  ^4       V P                  VP                  ^ ,          P                   ^ 4       V P                  VP                  ^ ,          P                  P                   ^4       V P                  VP                  ^ ,          P                  P                  ^ ,          P                   ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                   ^
4       V P                  VP                  ^ ,          P                  P                  ^,          P                   ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                  P                  ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                  P0                  ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                  P                   ^4       V P                  VP                  ^ ,          P                  P                  ^,          P                  P2                  ^4       R# )z?
a = 10
f'''
  {a
     *
       x()}
non-important content
'''
z$
a = f'''
          {blech}
    '''
N)rG   rH   r2   r4   rR   rS   rT   rU   rV   rW   rX   rY   rZ   ri   r   r[   rc   r\   r]   r^   r_   r`   ra   rb   rw   rx   rd   s   &   r   'test_ast_line_numbers_multiline_fstring0TestCase.test_ast_line_numbers_multiline_fstring3  s    IIdOa#**-QVVa(affQi#**5))1-affQi#((3affQioo.>QVVAY__334a8affQioo44Q78#,,GaffQioo44Q7==>DaffQioo44Q78#:L:LMaffQioo44Q78#,,GaffQioo44Q7==>D))1-//3//2991=//2991=//2991=--q133Q7//2==qA//2==qA//2==rB q	&&q)//ecii0ejj)3884ehh2ekk*CHH5q)**A.++Q/))1-..2//3
 IIdOa#**-QVVa(affQi#**5affQioo.>QVVAY__334a8affQioo44Q78#:L:LM))1-//3//2991=//2991=//2991=--q133Q7//2==qA//2==rB//2==rB//288??C//288CCQG//288CCRH//288GGLr    c                *   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          P                  pV P                  \        V4      \         P                  4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       VP                  ^ ,          P                  P                  ^,          pV P                  \        V4      \         P                  4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       VP                  ^ ,          P                  P                  ^,          P                  pV P                  \        V4      \         P                  4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       Rp\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  w  rgVP                  P                    Uu. uF  pVP                  VP                  3NK  	  p	pT P#                  \$        ;QJ d    R V	 4       F  '       d   K   RM	  RM! R V	 4       4      4       VP                  P                    Uu. uF  pVP                  VP                  3NK  	  p	pT P#                  \$        ;QJ d    R V	 4       F  '       d   K   RM	  RM! R V	 4       4      4       Rp\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          P                  P                   ^,          p
V P                  \        V
4      \         P                  4       V P                  \        V
P                  4      ^4       V
P                  w  rpV P                  \        V4      \         P&                  4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       VP                  pV P                  \        V4      \         P                  4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  \        V4      \         P&                  4       V P                  VP                  ^4       V P                  VP                  ^4       V P                  VP                  ^ 4       V P                  VP                  ^4       V P                  V
P                  ^4       R# u upi u upi )z
x = (
    f" {test(t)}"
)z
x = (
    u'wat',
    u"wat",
    b'wat',
    b"wat",
    f'wat',
    f"wat",
)

y = (
    u'''wat''',
    u"""wat""",
    b'''wat''',
    b"""wat""",
    f'''wat''',
    f"""wat""",
)
        c              3   ,   "   T F
  pVR8H  x  K  	  R# 5i)   N)r   
   r   .0offsets   & r   	<genexpr>BTestCase.test_ast_line_numbers_with_parentheses.<locals>.<genexpr>        
! g!   FTc              3   ,   "   T F
  pVR8H  x  K  	  R# 5i)r   N)r      r   r   s   & r   r   r     r   r   zv
x = (
        'PERL_MM_OPT', (
            f'wat'
            f'some_string={f(x)} '
            f'wat'
        ),
)
N)rG   rH   r2   r4   rR   rS   rT   rX   rY   rV   rw   rc   rx   rZ   r[   rb   eltsrK   allri   )r   rL   rM   	joinedstrfvrp   r5   r6   eltoffsetsfstringwat1middlewat2s   &             r   &test_ast_line_numbers_with_parentheses/TestCase.test_ast_line_numbers_with_parentheses  s    IIdOa#**-QVVa(FF1IOO	i#--8))1---q1--q11126VVAY__##A&b3#5#56A&****B/vvay%%a(..dSXX.a(!,!,,,b1& IIdOa#**-QVVa(vv
 ww||
# ^^S//0# 	 
 	 
!
 
!
 
 	 ww||
# ^^S//0# 	 
 	 
!
 
!
 
 	
 IIdOa#**-QVVa(&&)//&&q)g6W^^,a0$^^ddS\\2a(!,"-,,b1||dSXX.a(!,"-,,b1dS\\2a(!,"- 	,,b1//4u

s   !\?!\c                   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  \        V4      \         P                  4       VP                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^ 4       R# )z
f'{expr:}'N)rG   rH   r2   r4   rR   rS   rT   rX   rY   rZ   r[   format_spec)r   rL   modr   r   r   s   &     r   "test_ast_fstring_empty_format_spec+TestCase.test_ast_fstring_empty_format_spec  s    iiocCJJ/SXX*((1+##g6W^^,a0^^Ab3#5#56nnk*CMM:[//0!4r    c                   R p\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  \        V4      \         P                  4       VP                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  \        V4      \         P                  4       V P                  VP                  P                  R4       Rp\         P                  ! V4      pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          P                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  \        V4      \         P                  4       VP                  pV P                  \        V4      \         P                  4       V P                  \        VP                  4      ^4       VP                  ^ ,          pV P                  \        V4      \         P                  4       V P                  VP                  P                  R4       VP                  ^,          pV P                  \        V4      \         P                  4       V P                  VP                  P                  R4       R# )zf'{1:{name}}'rz   zf'{1:{name1}{name2}}'name1name2N)rG   rH   r2   r4   rR   rS   rT   rX   rY   rZ   r[   r   id)r   rL   r   r   r   r   format_spec_values   &      r   test_ast_fstring_format_spec%TestCase.test_ast_fstring_format_spec  s   iiocCJJ/SXX*((1+##g6W^^,a0^^Ab3#5#56nnk*CMM:[//0!4'..q1/0#2D2DE*0033V<&iiocCJJ/SXX*((1+##g6W^^,a0^^Ab3#5#56nnk*CMM:[//0!4'..q1/0#2D2DE*0033W='..q1/0#2D2DE*0033W=r    c                ~    R  pV P                  VP                  4       R pV P                  VP                  4       R# )c                      R# zNot a docstringNr   r   r    r   f"TestCase.test_docstring.<locals>.f8  s    r    c                      R# r   r   r   r    r   g"TestCase.test_docstring.<locals>.g;  s    !r    N)assertIsNone__doc__)r   r   r   s   &  r   test_docstringTestCase.test_docstring7  s2    	#!))$	 	!))$r    c                    V P                  \        R 4      ;_uu_ 4        \        P                  ! R4       RRR4       R#   + '       g   i     R# ; i)zmalformed node or stringzf'x'N)r   
ValueErrorrG   literal_evalr?   s   &r   test_literal_evalTestCase.test_literal_eval@  s4    ##J0JKKV$ LKKKs   A  A	c                    R .pRp\         P                  ! V4      p\        VR R4      p\        V4       V P	                  V^ ,          R4       R# )r/   zx[0] = 'foo' f'{3}'rF   foo3N)rG   rH   rI   rF   r2   )r   r5   rL   rM   rN   s   &    r   test_ast_compile_time_concat%TestCase.test_ast_compile_time_concatD  sD    D(IIdOAr6"Q1v&r    c                8    V P                  \        R RR.4       R# )z&cannot mix bytes and nonbytes literalszf'' b''zb'' f''Nr   SyntaxErrorr?   s   &r   test_compile_time_concat_errors(TestCase.test_compile_time_concat_errorsM  s     KD++	 r    c                r    V P                  R R 4       V P                  RR4       V P                  RR4       R# )r/   a Nr2   r?   s   &r   test_literalTestCase.test_literalT  s2    b!1s#1s#r    c                8    V P                  \        R . RO4       R# )zunterminated stringN)zf'{"x'zf'{"x}'zf'{("x'zf'{("x}'r   r?   s   &r   test_unterminated_string!TestCase.test_unterminated_stringY  s    K)>	 r    zexhausts limited stack on WASIc                ,   V P                  \        R R.4       V P                  \        RR.4       V P                  \        RR.4       V P                  \        RR.4       V P                  \        R R.4       V P                  \        \        R
4       R	# )z@closing parenthesis '\}' does not match opening parenthesis '\('zf'{((}'z@closing parenthesis '\)' does not match opening parenthesis '\['z	f'{a[4)}'z@closing parenthesis '\]' does not match opening parenthesis '\('z	f'{a(4]}'z@closing parenthesis '\}' does not match opening parenthesis '\['zf'{a[4}'zf'{a(4}'Nzf'{((((((((((((((((((((}')r   r   assertRaisesr   r?   s   &r   test_mismatched_parensTestCase.test_mismatched_parensa  s    K *G& 	  	K *G( 	 	K *G( 	 	K *G' 	 	K *G' 	 	+t-BCr    c                   a a V 3R  lpV! R4       V3R loV! S! ^4      4       V! R4       V! R	4       V! RRR,          ,           R,           4       R# )
c                    <  \        V 4       SP                  R 4       R#   \         d     R# \         d     R# \         d)   pSP                  R\        T4       24        Rp?R# Rp?ii ; i)zNo exception raisedz-Should raise SyntaxError or MemoryError, not N)r   failr   MemoryError	Exceptionr4   )txtexr   s   & r   raises_syntax_or_memory_errorNTestCase.test_fstring_nested_too_deeply.<locals>.raises_syntax_or_memory_error{  sc    	1S	 		/0    V		I$r(TUUVs*   ! A.A.A.A.A.A))A.zf"{1+2:{1+2:{1+1:{1}}}}"c                 @   < V ^ 8X  d   R# S! V ^,
          4      pRV R2# )r   z1+1zf"{z}"r   )nprevcreate_nested_fstrings   & r   r   FTestCase.test_fstring_nested_too_deeply.<locals>.create_nested_fstring  s*    Av(1-D$s##r    zf'{(}'i'  Nzif'{((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((}'a  f'{((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((}'r   )r   r   r   s   f @r   test_fstring_nested_too_deeply'TestCase.test_fstring_nested_too_deeplyy  sP    
	1 	&&@A	$ 	&&;C&@A%&<=%&=>%ec&j&84&?@r    c                6    V P                  \        R R.4       R# )invalid syntaxNa  f"{1 1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:{f"1:r   r?   s   &r   #test_syntax_error_in_nested_fstring,TestCase.test_syntax_error_in_nested_fstring  s    K,89	;r    c                   V P                  R R 4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  R	R	4       V P                  R
R
4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  R ^
 2R4       V P                  R^
 2R4       V P                  R^
 2R4       V P                  R^
 2R4       V P                  ^
 R 2R4       V P                  ^
 R2R4       V P                  ^
 R2R4       V P                  ^
 R2R4       V P                  R R4       V P                  \        RR.4       R# ){za{z{bza{b}za}z}bza}bz{}za{}z{b}z{}cza{b}za{}cz{b}cza{b}cz{10z}10z}{z}{10z}a{z}a{10z10{z10}z10}{z}a{}z10}a{}z{{}}zunhashable typezf'{ {{}} }'N)r2   r   	TypeErrorr?   s   &r   test_double_bracesTestCase.test_double_braces  s   2$3&3&4%(2$3&3&4%(4$'55)55)55)6F+6F+6F+7W-2bTE*2bTE*4tf-5w/B4rE*B4rE*B4tf-B4z)84 	F8f-I'8* 	 r    c                ,   R pV P                  RV R2R4       V P                  RV R2R4       V P                  RV RVR 2R4       V P                  RV 2R	4       V P                  R
V 2R4       V P                  RV 2R	4       V P                  RV 2R4       V P                  RV 2R4       V P                  RV 2R4       V P                  V R2R4       V P                  V R 4       V P                  V R 4       V P                  V R 4       V P                  V R2R4       V P                  RV R2R4       V P                  RV 2R4       V P                  V RV 2R4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  R R4       V P                  \        RR.4       R# )defzabc## ghizabc## defghiabc	abcdefghi4zabcdefghidef z{x}z{x}defz{xz{xdefz{{x}}z{{x}}defz{{xz{{xdefzx}}zx}}defzdefx}}2def211def21def-zdef-defr/   z fzexpecting '}'z
f'{3' f"}"Nr2   r   r   r   r5   s   & r   test_compile_time_concat!TestCase.test_compile_time_concat  s$   QCs+^<!e+[9!hqe4oF!x0g.!x0A34!x0!x0A3x0A3E*qcu-qcE*A3V,sC1sV,A3!A33$B'+b!$R(+ 	D6D)K- 	 r    c                   R R/pV P                  R  R 4       V P                  VR ,           R4       V P                  \        R. RO4       V P                  \        RR.4       V P                  R^ 2R4       V P                  R^* 2R4       V P                  R^* 2R4       V P                  R	^ 2R
4       V P                  R^V 2R4       V P                  \        RR.4       R# )#hashz'{' was never closedf-string: unmatched '\)'zf'{)#}'zA complex trick: zA complex trick: 2
z
42z
# this is not a comment
z
# this is not a comment
6z
86.f-string: valid expression required before '}'zf'''
{
# only a comment
}'''
N)zf'{1#}'zf'{#}'zf'one: {1#}'z(f'{1# one} {2 this is a comment still#}'r   r   ds   & r   test_commentsTestCase.test_comments  sL   &MC53'AcF8f-K)?	  	K)D& 	  	. / 	 	 
 	 	 
 	 	  
(		)
 	   		 	K)Z 	 r    c                   R
R lpRp^p\        ^R4       F2  pV P                  \        V! V4      4      VR,           V,          4       K4  	  V P                  \        V! ^4      R,          4      VR,           R,          4       V! ^R4      pV P                  \        V4      VR,           ^,          4       RR,          pV P                  \        V4      R4       R	# )r/   c                 >    R RV ,          ,           V,           R,           # )f'z{x} 'r   )r   extras   &&r   
build_fstr2TestCase.test_many_expressions.<locals>.build_fstr  s    6A:&.44r    r*   i  r      z{x:{width}} zf'{1}' 'x' 'y'i   N)r/   i      1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy1xy)ranger2   r   )r   r  r5   widthiss   &     r   test_many_expressionsTestCase.test_many_expressions  s    
	5  sCAT*Q-01S5!)< ! 	joc12QsUW4EFsN+a1S5#+. t#a,/r    c           	     D   ^
p^p\         P                  ! R4      pV P                  RW1 RV 2 2R4       V P                  RW1: RV 2 2R4       V P                  RW1R RVR 2 2R4       V P                  RV^ ^ R RVR 2 2R4       V P                  RV^ ^ R RVR 2 2R4       V P                  ^
R^ R2 R	4       V P                  ^
R R^  R
 2 R	4       V P                  RRR R^  R
2 R4       V P                  RR R^ RR
 2 R4       T P                  ^
R^^^/8g  ;'       d    T R
2 R	4       V P                  RW1^   RVR 2 2R4       V P                  \        RR.4       V P                  \        RR.4       V P                  \        RR.4       R# )r   z12.34567zresult: .zresult:      12.350r   r   0xz
       0xar5   r   z
      -0xazf-string: expecting ':' or '}'zf'{"s"!r{":10"}}'0f-string: expecting a valid expression after '{'zf'{4:{/5}}'&f-string: invalid conversion characterzf'{"s"!{"r"}}'Ni)decimalDecimalr2   r   r   )r   r  	precisionrX   s   &   r   !test_format_specifier_expressions*TestCase.test_format_specifier_expressions.  s   	
+8E'9+)=#>?AUV8E)1YK)?#@ACWX8E)1YqM)A#BCEYZ8E1#aU!Ia=)@#ABDXY8EA$!fAy^)C#DEG[\Bq2g;6BuAaSo.>C#as!|,|<CQqc3%/0<@Bqqe!5!5 6a78<H8E!+Qym)C#DEG[\K)I4 	 
 	KN*	  	K)Q 2	 r    c                    ! R  R4      pV P                  V! 4       R R4       V P                  V! 4       R R4       V P                  \        4      ;_uu_ 4        \        RRV/4       RRR4       R#   + '       g   i     R# ; i)c                   &   a  ] tR tRt o R tRtV tR# );TestCase.test_custom_format_specifier.<locals>.CustomFormatiP  c                    V# Nr   )r   r   s   &&r   r   FTestCase.test_custom_format_specifier.<locals>.CustomFormat.__format__Q  s    ""r    r   Nr!   r(   s   @r   CustomFormatr  P  s     # #r    r"  r   u   ☃u   f"{F():¯\_(ツ)_/¯}"FN)r2   assertWarnsSyntaxWarningrF   )r   r"  s   & r   test_custom_format_specifier%TestCase.test_custom_format_specifierO  sl    	# 	# 	LN2.6LN62U;m,,*S,,?@ -,,,s   A33B	c                V     ! R  R4      pV! 4       pV P                  V RV 2R4       R# )c                   ,   a  ] tR tRt o R tR tRtV tR# )*TestCase.test_side_effect_order.<locals>.XiZ  c                    ^ V n         R# r   Nr  r?   s   &r   r@   3TestCase.test_side_effect_order.<locals>.X.__init__[  s	    r    c                ^    V ;P                   ^,          un         \        V P                   4      # )   )r  r   r   s   &&r   r   5TestCase.test_side_effect_order.<locals>.X.__format__]  s    !466{"r    r-  N)r"   r#   r$   r%   r@   r   r&   r'   r(   s   @r   r*   r*  Z  s     # #r    r*   r   z1 2Nr   )r   r*   r5   s   &  r   test_side_effect_orderTestCase.test_side_effect_orderY  s/    	# 	# CA3asU+r    c                    V P                  \        R . RO4       V P                  \        R. R	O4       V P                  \        R. R
O4       V P                  \        R. RO4       V P                  \        RRR.4       R# )r   z.f-string: valid expression required before '!'z.f-string: valid expression required before ':'z.f-string: valid expression required before '='z'invalid non-printable character U\+00A0u   f'''{ }'''    N)zf'{}'zf'{ }'f' {} 'zf'{10:{ }}'zf' { } 'zf'''{	
}''')zf'{!r}'zf'{ !r}'zf'{!}'zf'''{	
!a}'''zf'{!'zf'{!s:'zf'{!x}'z	f'{ !xr}'zf'{!x:}'z	f'{!x:a}'z
f'{ !xr:}'zf'{ !xr:a}')zf'{:}'zf'{ :!}'zf'{:2}'zf'''{	
:a}'''zf'{:'zF'{[F'{:'}[F'{:'}]]])zf'{=}'zf'{ =}'zf'{ =:}'z
f'{   =!}'zf'''{	
=}'''zf'{='r   r?   s   &r   test_missing_expression TestCase.test_missing_expressiond  s    KL		  	KL	 , 	KL	  	KL	  	K)S,#	 r    c                    V P                  R R4       V P                  \        RR.4       V P                  \        RR.4       R# )   z(3,)r  zf'{,}'r   z
f'{3)+(4}'N)r9  r   r?   s   &r   test_parens_in_expressions#TestCase.test_parens_in_expressions  sL    B4&)KN% 	 
 	K)D) 	 r    c                8    V P                  \        R . RO4       R# )r  N)zf'{.}'z
f'{.}'z

f'{.}'r   r?   s   &r   !test_newlines_before_syntax_error*TestCase.test_newlines_before_syntax_error  s    KN4	6r    c                   V P                  R R 4       V P                  RR4       V P                  RR4       V P                  ^ R 2R4       V P                  ^ R ^ 2R4       V P                  R ^ 2R4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  ^ R2R4       V P                  ^ R^ 2R4       V P                  R^ 2R	4       V P                  RR4       V P                  R
R
4       V P                  R
R
4       V P                  ^ R2R4       V P                  ^ R^ 2R4       V P                  R^ 2R	4       V P                  RR4       V P                  ^ R2R4       V P                  ^ R^ 2R4       V P                  R^ 2R	4       V P                  RR4       V P                  RR4       V P                  R	R	4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  ^ R2R4       V P                  ^ R^ 2R4       V P                  R^ 2R4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  \        4      ;_uu_ 4        \        R4      pRRR4       V P                  XR4       V P                  \        4      ;_uu_ 4        \        R4      pRRR4       V P                  VR4       V P                  R^* 2R4       V P                  R^* 2R4       RpV P                  RR4       V P                  RV 2R4       V P                  RV 2R4       V P                  RR4       R#   + '       g   i     L; i  + '       g   i     L; i)	z\tz2	z2	3z	3u   Δz\u0394u   2Δu   2Δ3u   Δ3z
\U00000394r   z\x20z2 z2 3z 3z	f'\{6*7}'Nz\42zf'\g'z\g\spam&z\Nz\Nspamz\&)r2   r$  r%  r   )r   rX   	AMPERSANDs   &  r   test_backslashes_in_string_part(TestCase.test_backslashes_in_string_part  s   2%&B'A3b5)A3bf-2aS5)6H-I.FY/A3fy1A3fQC*56!y1:16J7A3j)95A3j,j9:aS)959HEA3<=yIA3<QC@*M9!=yI:YG;jI:YG4#&'*D7+A3dT*A3d1#.4sT*54(6E*54(m,,&E -'m,,NE -&2cUV,AcUV,	 	=3/3yk*I6Byk*I6?U3 -, -,s   9N<N1N.	1O	c                8    V P                  \        R . RO4       R# )zi\(unicode error\) 'unicodeescape' codec can't decode bytes in position .*: malformed \\N character escapeN)
zf'\N'zf'\N 'zf'\N  'zf'\N{'z f'\N{GREEK CAPITAL LETTER DELTA'z'\N'z'\N 'z'\N  'z'\N{'z'\N{GREEK CAPITAL LETTER DELTA'r   r?   s   &r   %test_misformed_unicode_character_name.TestCase.test_misformed_unicode_character_name  s     	K  *V	 r    c                    V P                  ^ R4       V P                  RR4       V P                  R R4       V P                  R R4       V P                  \        RR.4       R# )r0  3r   r   zf'{
}'Nr   r?   s   &r   #test_backslashes_in_expression_part,TestCase.test_backslashes_in_expression_part   su     	
 	13745<56=KL& 	 r    c           	         R UUu. uF  pR F  pVP                  VR7      NK  	  K   	  pppV P                  \        RV4       R# u uppi ){expr})rL   z,unexpected character after line continuationN)rO  zf'{{{expr}}}'zrf'{{{expr}}}')z\'a\'z\t3rA  )r3   r   r   )r   
formattingrL   casess   &   r   /test_invalid_backslashes_inside_fstring_context8TestCase.test_invalid_backslashes_inside_fstring_context  sd    



 4( ) 	 
 	K)W!	#
s   $Ac                    V P                  R R 4       V P                  RR4       V P                  RR4       V P                  R R 4       R# )z{1+1}z{1+1Nr   r?   s   &r   test_no_escapes_for_braces#TestCase.test_no_escapes_for_braces"  sE    
 	9w/7V,9v.KgVr    c                R    V P                  ^  R4       V P                  ^ R4       R# )r   r  7Nr   r?   s   &r   test_newlines_in_expressions%TestCase.test_newlines_in_expressions,  s/    A3%   
	r    c                  a ^oV P                  V3R l! R4      : R4       V P                  V3R l! R4      :R R4       V P                  V3R l! R4      R R4       V P                  \        R	. RO4       V P                  \        R
4      ;_uu_ 4        \	        RRR4       RRR4       V P                  \        R4      ;_uu_ 4        \        R4       RRR4       R#   + '       g   i     LD; i  + '       g   i     R# ; i)   c                    < SV ,          # r   r   r6   r5   s   &r   r-   &TestCase.test_lambda.<locals>.<lambda>3  	    acr    8z'88888'c                    < SV ,          # r   r   r^  s   &r   r-   r_  4  r`  r    10z
'88888'   c                    < SV ,          # r   r   r^  s   &r   r-   r_  5  r`  r    z
88888     z@f-string: lambda expressions are not allowed without parenthesesr   z)lambda name_3=f'{name_4}': {name_3}
1 $ 1<string>rF   Nr  zf'{+ lambda:None}')zf'{lambda x:x}'zf'{lambda :x}'zf'{lambda *arg, :x}'zf'{1, lambda:x}'zf'{lambda x:}'zf'{lambda :}')r2   r   r   r   rI   r   r   s   &@r   test_lambdaTestCase.test_lambda1  s    \3/2Y?\3/5"5E\3/3lC
 	K2		  ##K1ABB@*fU C ##K1cdd%& ed	 CB edds   C 
C3 C0	3D	c                x    V P                  ^ R4       V P                  ^ R4       V P                  ^ R4       R# )r0  r   r   rK  Nr   r?   s   &r   test_valid_prefixesTestCase.test_valid_prefixesM  s8    A3%QC#&QC#&r    c                   V P                  R R 4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       R# )z\'z\"z\"\'z\'\"z\"\'\"z\'\"\'z\"\'\"\'Nr   r?   s   &r   test_roundtrip_raw_quotes"TestCase.test_roundtrip_raw_quotesR  ss    B'B'D9-D9-F\2F]3H'78r    c           
        . R	OpV Fk  w  r#V P                  W#R7      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \        V4      pRRR4       V P	                  XV4       RRR4       Km  	  V P	                  RR4       V P	                  RR4       V P	                  R^ 2R4       V P	                  R^ 2R4       V P	                  ^ R2R4       R#   + '       g   i     L; i  + '       g   i     K  ; i)
	f'\{{\}}'\{\}\{\{2\}22\})caseexpected_resultNz\}))ro  rp  )f'\{{'rq  )zf'\{{{1+1}'rr  )zf'\}}{1+1}'rs  )zf'{1+1}\}}'rt  )r   r$  r%  r   r2   )r   deprecated_casesru  rv  results   &    r   ,test_fstring_backslash_before_double_bracket5TestCase.test_fstring_backslash_before_double_bracket[  s    
 &6!D4II%%m44!$ZF 5  9 JI &6
 	FX.C%(Cuv.Cuv.SEv. 54 JIIs#   C.CC.C+&C..C?c                :   V P                  \        4      ;_uu_ 4       p\        R 4       RRR4       V P                  \	        XP
                  4      ^4       V P                  VP
                  ^ ,          P                  \        4       R#   + '       g   i     Lh; i)rw  N)r$  r%  r   r2   rS   warningscategory)r   ws   & r   7test_fstring_backslash_before_double_bracket_warns_once@TestCase.test_fstring_backslash_before_double_bracket_warns_oncen  s`    m,,O -QZZ!,A//? -,s   B

B	c                   V P                  R R 4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       V P                  RR4       R# )rA  z\\z\\\\Nr   r?   s   &r   !test_fstring_backslash_prefix_raw*TestCase.test_fstring_backslash_prefix_rawt  s    2%4&)B'D7+B'D7+B'D7+B'D7+B'D7+r    c                d    V P                  ^R R2R4       V P                  ^R^ 2 R2R4       R# )r0  r/   r   z1}z>3z$                                  1}Nr   r?   s   &r   (test_fstring_format_spec_greedy_matching1TestCase.test_fstring_format_spec_greedy_matching  s9    AQ4rD)AbV9B)OPr    c                    R  pV! ^4      pV P                  \        V4      ^4       V P                  \        V4      R4       R# )c              3   4   "   R V ^,          x  2 Rx   R# 5i)zy:Nr   )r6   s   &r   fnTestCase.test_yield.<locals>.fn  s     qsgs   N)r2   next)r   r  r   s   &  r   
test_yieldTestCase.test_yield  s:    	 qEa!$a$'r    c                    R  pV! ^
4      p\        V4      pV P                  V! ^4      ^(4       V P                  VP                  R4      R4       R# )c              3   *   a "   R V 3R lx  2x  R# 5i)x:c                    < SV ,          # r   r   )r  r5   s   &r   r-   6TestCase.test_yield_send.<locals>.fn.<locals>.<lambda>  s	    Ar    Nr   r5   s   fr   r  $TestCase.test_yield_send.<locals>.fn  s     o./00s   stringzx:stringN)r  r2   send)r   r  r   
the_lambdas   &   r   test_yield_sendTestCase.test_yield_send  sH    	1 rF!W
A+):6r    c                6   V P                  R  R 4       V P                  R R4       V P                  R R4       V P                  R R4       V P                  R R4       V P                  R R4       V P                  R R4       V P                  R R4       R# )r5   zeric'szxeric"syzxeric"szeric"syNr   r?   s   &r   +test_expressions_with_triple_quoted_strings4TestCase.test_expressions_with_triple_quoted_strings  s    G9s+L>H5 	01J?,-	:,-	:45
C89JG9:ZHr    c                   ^bpRpV P                  V V 2R4       V P                  RV V 2R4       V P                  V RV 2R4       V P                  V V R2R4       V P                  RV RV 2R4       V P                  RV V R2R	4       V P                  V RV R2R
4       V P                  RV RV R2R4       R# )b   r   98abcr*   X98abc98Xabc98abcXYX98YabcX98abcY98XabcYZX98YabcZNr   r   r5   r6   s   &  r   test_multiple_varsTestCase.test_multiple_vars  s    A3qcG,1QCsX.A3asX.A3qcX.1QCqi01QCs!i0A3as!i01QCq1z2r    c                    R  pV P                  V! R4      ! 4       R4       V P                  V! ^4      ! 4       R4       R# )c                    a  V 3R  lpV# )c                     < R S  2# )r  r   r  s   r   inner3TestCase.test_closure.<locals>.outer.<locals>.inner  s    A3xr    r   )r5   r  s   f r   outer$TestCase.test_closure.<locals>.outer  s     Lr    987zx:987zx:7Nr   )r   r  s   & r   test_closureTestCase.test_closure  s5    	
 	u1qU+r    c                   a ^oV3R lpV P                  V! R^
4      R4       RpV P                  V! ^
^
4      R4       R# )   c                     < R V S,          V  2# x=r   )r5   r  r6   s   &&r   r   "TestCase.test_arguments.<locals>.f  s    !UG}%%r    foozx=foofoo    barzx=        20Nr   )r   r   r5   r6   s   &  @r   test_argumentsTestCase.test_arguments  s@    	& 	5"~62rN3r    c                4    ^{pV P                  RV 2R4       R# ){   v:zv:123Nr   )r   rX   s   & r   test_localsTestCase.test_locals  s    2eWw/r    c                    V P                  \        4      ;_uu_ 4        R \         2 RRR4       R#   + '       g   i     R# ; i)r  N)r   	NameErrorrX   r?   s   &r   test_missing_variableTestCase.test_missing_variable  s+    y))L *)))s	   
2A	c                     ! R  R4      pV P                  V! 4       R R4       V P                  V! 4        R4       V P                  V! 4       R R4       V P                  ^R R4       V P                  ^:R R4       R# )c                   &   a  ] tR tRt o R tRtV tR# ),TestCase.test_missing_format_spec.<locals>.Oi  c                    V'       g   R # V# )*r   r   s   &&r   r   7TestCase.test_missing_format_spec.<locals>.O.__format__  s    r    r   Nr!   r(   s   @r   Or    s      r    r  r5   r  r/   rK  Nr   )r   r  s   & r   test_missing_format_spec!TestCase.test_missing_format_spec  sx    	 	 	AC7S)AC53'ACq6C(AQ4#&A6q6C(r    c                D   V P                  R \         2R4       V P                  R \        : 2R4       RpV P                  R \         RV 2R4       V P                  R \        : 2R4       V P                  R \         RV: 2R4       V P                  R\         4       R# )	g:zg:global variablezg:'global variable'local variable l:z"g:global variable l:local variablez$g:global variable l:'local variable'zmodule 'unittest' fromN)r2   a_globalassertInunittest)r   a_locals   & r   test_globalTestCase.test_global  s    2hZ*=>2h\*,AB"2hZs7)4=	?2h\*.	02hZs7+6?	A 	.8*>r    c                    R pV P                  RV 2R4       V P                  RV: 2R4       RpV P                  RV RV 2R4       V P                  RV: 2R4       V P                  RV RV: 2R4       R# )	zreally a localr  zg:really a localzg:'really a local'r  r  z!g:really a local l:local variablez#g:really a local l:'local variable'Nr   )r   r  r  s   &  r   test_shadowed_globalTestCase.test_shadowed_global  s    #2hZ*<=2h\*,@A"2hZs7)4<	>2h\*-	/2hZs7+6>	@r    c                >    R  pV P                  V! ^
4       R4       R# )c                 &    R \        V 4      ,           # r  r
   r  s   &r   r  TestCase.test_call.<locals>.foo  s    #a&= r    zx=10Nr   )r   r  s   & r   	test_callTestCase.test_call  s    	! 	CG9v.r    c                v    ^pV P                  ^  ^,           R4       V P                  V ^,           R4       R# )r\  000555Nr   )r   r6   s   & r   test_nested_fstringsTestCase.test_nested_fstrings  s7    qc1H:.qc1H:.r    c                    . ROpV Uu. uF  q"P                  RR4      NK  	  ppV P                  \        RW,           4       R# u upi )fu''r  "zprefixes are incompatibleN)r  zuf''zFu''zfU''zUf''zuF''zufr''zurf''zfur''zfru''zrfu''zruf''zFUR''zFur''zfb''zfB''zFb''zFB''zbf''zbF''zBf''zBF'')replacer   r   )r   single_quote_casesru  double_quote_casess   &   r   test_invalid_string_prefixes%TestCase.test_invalid_string_prefixes  sN    &, BTTASll34ASTK)D.C	E Us   Ac           	     Z   V P                  ^ R4       V P                  ^ R4       V P                  ^ R4       V P                  ^ R4       T P                  RR UUu/ uF  w  rWbK	  	  upp 2R4       T P                  RR UUu/ uF  w  rWbK	  	  upp 2R4       R# u uppi u uppi )r9  rK  zexpr=zexpr={1: 2}N))r0  r  r   r  s   &  r   test_leading_trailing_spaces%TestCase.test_leading_trailing_spaces  s    Q4#&a53'A4#&A53'5J"?JDA14J"? @A&	(5J"?JDA14J"? AB&	( #@"?s   B!B'c                    V P                  ^^8g   R4       V P                  ^^8g  R R4       V P                  ^^8g  : R4       V P                  ^^8g  :R R4       R# )r9  Truer/   z.3TruNr   r?   s   &r   test_not_equalTestCase.test_not_equal)  sb    
 	AqD6F+AqD7V,AqD8f-AqD;2;/r    c                2    V P                  ^ ^8H   R4       R# )r   FalseNr   r?   s   &r   test_equal_equalTestCase.test_equal_equal3  s     	AqD6G,r    c                   V P                  R R R4       V P                  R:R R4       V P                  R:R R4       V P                  R:R R4       V P                  R R4       V P                  R: R4       V P                  R: R4       V P                  ^: R4       V P                  R:R R4       V P                  R R4       V P                  R R	 R
4       V P                  \        RRR.4       V P                  \        R. RO4       R F0  pV P                  \        RV,          RV,           R,           .4       K2  	  R F)  pV P                  \        RRV,           R,           .4       K+  	  R F)  pV P                  \        RRV,           R,           .4       K+  	  V P                  \        R. RO4       R# )gQ	@z10.10z
      3.14g      ?z
1.25      r   z'a'rK  za!rz!<10.10z
3.14!!!!!!f-string: expecting '}'f'{3!'f'{3!s'z&f-string: missing conversion characterzDf-string: invalid conversion character %r: expected 's', 'r', or 'a'zf'{3!r   r  zDf-string: conversion type must come right after the exclamation markzFf-string: invalid conversion character 'ss': expected 's', 'r', or 'a'N)zf'{3!}'zf'{3!:'zf'{3!:}')r   AG   äu   ɐ)rK  !)z sz s )z	f'{3!ss}'z
f'{3!ss:}'zf'{3!ss:s}'r   )r   conv_identifierconv_non_identifierconvs   &   r   test_conversionsTestCase.test_conversions9  s   D<,7D>5>L9D>5>L9D>5>L9C53'C7U+C7U+ 	A7S)D+U+l; 	E7U+ 	D>L9K)B%&	 
 	K)Q	   9O!<>M!N!(?!:T!A BD  9 $, H!(+>!>!E FH $,
  D!4!(4$!6 79   	K8	 r    c                8    V P                  \        R . RO4       R# )r   N)zf'' = 3z
f'{0}' = xz
f'{x}' = xr   r?   s   &r   test_assignmentTestCase.test_assignmentr  s    K):	 r    c                8    V P                  \        R RR.4       R# )r   zdel f''z
del '' f''Nr   r?   s   &r   test_delTestCase.test_dely  s     K)9&)	 r    c                B   V P                  \        R . R
O4       V P                  \        R. RO4       V P                  \        RR.4       V P                  R R4       V P                  R R4       V P                  ^R R2 R4       V P                  ^R R2 R4       R	# )z#f-string: single '}' is not allowedr  r  zf'{3:{{>10}'r   r   z>10z
}}}}}}}}}3z
{{{{{{{{{2N)zf'{{}'zf'{{}}}'zf'}'zf'x}'zf'x}x'z
f'\u007b}'zf'{3:}>10}'zf'{3:}}>10}')zf'{3'r   zf'{3:'r  zf'{3!s:'z	f'{3!s:3'zf'x{'zf'x{x'zf'{x'zf'{3:s'zf'{{{'zf'{{}}{'zf'{'zf'{i=')r   r   r2   r?   s   &r   test_mismatched_bracesTestCase.test_mismatched_braces  s    K)N
	  	K)B	 " 	KN+ 	  	C53'C53'Ase3Y<,7Ase3Y<,7r    c                   a  V 3R  lpV 3R lpV 3R lpV! R^4       V! R^4       V! R^4       V! R^4       V! R^4       V! R^4       R# )c                 J   < ^ pV  '       d   ^pM^pSP                  W!4       R# r,  r   r5   expectedflagr   s   && r   test_fstring2TestCase.test_if_conditional.<locals>.test_fstring  s'    DvT,r    c                 J   < ^ pV  '       d   ^pM^pSP                  W!4       R# r,  r   r  s   && r   test_concat_empty7TestCase.test_if_conditional.<locals>.test_concat_empty  s'    DCyT,r    c                 N   < ^ pRV  2'       d   ^pM^pSP                  W!4       R# )r   r   Nr   r  s   && r   test_concat_non_empty;TestCase.test_if_conditional.<locals>.test_concat_non_empty  s)    DaSzT,r    r/   r   Nr   )r   r  r  r  s   f   r   test_if_conditionalTestCase.test_if_conditional  sP    
	-	-	- 	RS!"a #q!b!$c1%r    c                    R pV P                  V R 4       V P                  VR R 4       V P                  V:R R 4       V P                  V:R R4       R# )testr/   z'test'Nr   r   s   & r   test_empty_format_specifier$TestCase.test_empty_format_specifier  sY    A3(AQ4&)A6q6F+A6q6H-r    c                8   R R^ R/p^ pV P                  V^ ,           R4       V P                  VR ,           R4       V P                  W,           R4       V P                  RP                  VR7      R4       V P                  RP                  VR7      R4       R# )r   r  integerz{d[a]})r   z{d[0]}N)r2   r3   )r   r   r   s   &  r   test_str_format_differences$TestCase.test_str_format_differences  s    (	 AaD6I.AcF8h/AD6I.1-x81-y9r    c                j    V P                  \        R RR.4       V P                  \        RRR.4       R# )unsupportedzf'{(lambda: 0):x}'zf'{(0,):x}'zUnknown format codezf'{1000:j}'N)r   r   r   r?   s   &r   test_errorsTestCase.test_errors  s?    I}2+	  	J(=++	r    c           	        \        4       ;_uu_ 4       p\        P                  P                  VR 4      p\	        VRRR7      ;_uu_ 4       pVP                  R4       RRR4       \        VRR7      w   rERRR4       V P                  XP                  RR4      X4       R#   + '       g   i     LL; i  + '       g   i     LG; i)	zt.pyr  utf-8)encodingzf"{a b}"Nascii)PYTHONIOENCODINGbackslashreplace)	r   ospathjoinopenwriter   r  encode)r   cwd	file_pathr   ry   stderrs   &     r   test_filename_in_syntaxerror%TestCase.test_filename_in_syntaxerror  s    ZZ3S&1Iiw771
# 80BIKLAq	  	i&&w0BCVL	 87 Zs#   7B3
B 	B3 B0+B33C	c                t    \        R 4       F(  pV P                  RV 2R\        V4      ,           4       K*  	  R# )i  zi:N)r  r2   r   )r   r  s   & r   	test_loopTestCase.test_loop  s.    tAr!Xtc!f}5 r    c                    R RRRRR/pV P                  VR,           R4       V P                  VR ,           R4       V P                  VR,           R4       V P                  VR,           R4       R# )r  dquoter  squoter  r  Nr   r   s   & r   	test_dictTestCase.test_dict  sr    ((E 	afX(3afX(3AeH:.AeH:.r    c                r    V P                  \        R 4      R4       V P                  \        R4      R4       R# )zf"\
"r/   zf"\"N)r2   r   r?   s   &r   test_backslash_charTestCase.test_backslash_char  s,     	i"-i"-r    c           	       a R oV P                  RS: 2R\        S4      ,           4       V P                  RS: 2R\        S4      ,           4       V P                  RS: 2R\        S4      ,           4       V P                  RS: 2R\        S4      ,           4       V P                  RS: 2R\        S4      ,           4       RoV P                  RSR 2R\	        SR4      ,           4       V P                  RSR 2R\	        SR4      ,           4       V P                  RS:R 2R\	        \        S4      R4      ,           4       V P                  RS:R 2R\	        \        S4      R4      ,           4       V P                  RS:R 2R\	        \        S4      R4      ,           4       ^	oV P                  R^S,          ^,           : 2R4       R	pV P                  R
VR 2R4       V P                  RR: 2R4       V P                  RRR 2R R4       RpV P                  RV: R2R4       V P                  R^: 2R4       V P                  ^ ^8H   R4       V P                  ^ ^8g   R4       V P                  ^ ^8*   R4       V P                  ^ ^8   R4       V P                  R;o R4       V P                  SR4       V P                  ^;o R4       V P                  S^4       V P                  R R4       ^oV P                  SR R4       V3R  lp^ oV P                  V! R!R"7       R#4       V P                  SR!4       V P                  V! ^R"7       R!4       V P                  S^4       ^pV P                  ^R$V: 2 R%4       V P                  \
        P
                  P                  4       R&V: R'V: R(V: 2 R)4        ! R* R+4      pV P                  R,V! 4       : 2R-4       V P                  R,V! 4       : 2R-4       V P                  R,V! 4       R 2R.4       V P                  R,V! 4       R/ 2R04       V P                  R,V! 4       R1 2R24       V P                  R,V! 4       :R 2R34       V P                  V! 4       R4^: 2 R54       V P                  \        \        R64       R7oV P                  R8S: R92R8\        S4      ,           R9,           4       V P                  R:S: R92R:\        S4      ,           R9,           4       V P                  R;S: R92R;\        S4      ,           R9,           4       V P                  R<S: R92R<\        S4      ,           R9,           4       V P                  R=^^R> R?2 2R@4       V P                  RA^: 2RB4       V P                  RCRD: 2RE4       V P                  RFRG: 2RH4       V P                  RIRJ: 2RK4       V P                  RLRM: 2RN4       V P                  RO RO4       RP# )QzA stringr  zx =g	@z.2fr/   z^20z3*x+15=z	3*x+15=42gffffff?@u   tenπ=u   tenπ=31.40u   "Σ"=u   Σu	   "Σ"='Σ'z3.1415=go!	@z.1fz*^20z*****3.1415=3.1*****u   πu   alpha α pi=u	    ω omegau   alpha α pi='π' ω omegaz
3
=z
3
=3r  r  5==10
        20c                    < SpV oV# r   r   )r   oldxr5   s   & r   r   )TestCase.test_debug_conversion.<locals>.fF  s    DAKr    z3=)r   r  zy=yyyyyyyyyyyyyyyyyyy2zh1y=zh2y=zh3y=zh1y=20h2y=20h3y=20c                   ,   a  ] tR tRt o R tR tRtV tR# ))TestCase.test_debug_conversion.<locals>.CiX  c                    R V 2# )zFORMAT-r   )r   r  s   &&r   r   4TestCase.test_debug_conversion.<locals>.C.__format__Y  s     }$r    c                    R # )REPRr   r?   s   &r   __repr__2TestCase.test_debug_conversion.<locals>.C.__repr__[  s    r    r   N)r"   r#   r$   r%   r   rZ  r&   r'   r(   s   @r   CrU  X  s     % r    r\  zC()=zC()=REPRzC()=FORMAT-r   zC()=FORMAT- r5   zC()=FORMAT-xzC()=********REPR********z20=zFORMAT-20=20zf'{C=]'r  zXx=r  zXx  =zXx=  zXx  =  zsadsd 1 + 1 =  1dr   zsadsd 1 + 1 =  2.000000z	1+2 = 
  z
1+2 = 
  3z""" # booo
  """=z
 # booo
  z""" # booo
  """=' # booo\n  'z" # nooo "=z # nooo z" # nooo "=' # nooo 'z" \" # nooo \" "=z " # nooo " z" \" # nooo \" "=' " # nooo " 'z 
  """hello"""=helloz 
  """hello"""='hello'z!# this is not a comment
        aN)
r2   reprr   r2  r3   datetimenowr   r   r   )r      tenπpir   r6   r\  r5   s   &     @r   test_debug_conversionTestCase.test_debug_conversion  s   BA4$a.1CA5547?3BA6D3q6M2BA6D47N3BA6D58O4BAs8dVAu-=&=>BAa54&B-#78BA::vd1gu/E(EFBA::vc!fe/D(DEBA::veAh/F(FGGAaCF9{3 FE3<-8 	ED7]3 	wvsm,T25KL =RE35PQ 	   	 	AqD6G,AqD6F+AqD6F+AqD6G,VQ:,C TQ8c*AC53' 	Ac7\2	
 AI;-D!AF8d+A ArqdU8&<=H--113Eqd%QD1$3FG-	/	 	 	DAC6J/DAC8j1DAC7]3DAC8n5DAC8n5DAC=4=)+EFACv;8+tY7 4QDE$q'M#$56 	6QF!gd1goc&9:6QF!gd1goc&9:8QHA	$q'(9#(=>+%U2Ja<!89;TU C  	 	    	
.	0 	KJ=)+DE-,./1VW  /	1  
0	2r    c                   \         P                  ! 4       ;_uu_ 4        \         P                  ! R \        4       V P	                  \        R4      R4       RRR4       V P	                  RR: 2R4       V P	                  RR: 2R	4       V P	                  R
R: 2R4       V P	                  RR: 2R4       R#   + '       g   i     Lj; i)ignorezf'{b"\N{OX}"=}'zb"\N{OX}"=b'\\N{OX}'Nzr"\xff"=z\xffzr"\xff"='\\xff'zr"\n"=\nzr"\n"='\\n'z'\''=r  z'\''="'"z'\xc5'=   Åu   '\xc5'='Å')r}  catch_warningssimplefilterr%  r2   r   r?   s   &r   &test_debug_expressions_are_raw_strings/TestCase.test_debug_expressions_are_raw_strings  s    $$&&!!(M:T"89;VW ' 	HG:(>?FE8&89ED7]3GF9~6 '&s   7B77C	c                    ^pV P                  VR R4       V P                  ^
;p R4       V P                  V^
4       R# )   rN  rO  rc  Nr   r   s   & r   test_walrusTestCase.test_walrus  sE     	Ac7\2 	UQ9t,Br    c                    V P                  \        R 4      ;_uu_ 4        \        RRR4       RRR4       R#   + '       g   i     R# ; i)/f-string: expecting '=', or '!', or ':', or '}'z
f'{a $ b}'?rF   Nr   r   rI   r?   s   &r   !test_invalid_syntax_error_message*TestCase.test_invalid_syntax_error_message  sA    ##K$UW WL#v.W W W Ws	   7A	c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        ^R  RRR4       R#   + '       g   i     R# ; i)zCannot specify ',' with ','.z,,Nreescaper   r   r   	error_msgs   & r   (test_with_two_commas_in_format_specifier1TestCase.test_with_two_commas_in_format_specifier  :    II<=	##J	::f ;:::   AA	c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        ^R  RRR4       R#   + '       g   i     R# ; i)zCannot specify '_' with '_'.__Nry  r|  s   & r   ,test_with_two_underscore_in_format_specifier5TestCase.test_with_two_underscore_in_format_specifier  r  r  c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        ^R  RRR4       R#   + '       g   i     R# ; i) Cannot specify both ',' and '_'.z,_Nry  r|  s   & r   8test_with_a_commas_and_an_underscore_in_format_specifierATestCase.test_with_a_commas_and_an_underscore_in_format_specifier  :    II@A	##J	::f ;:::r  c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        ^R  RRR4       R#   + '       g   i     R# ; i)r  z_,Nry  r|  s   & r   7test_with_an_underscore_and_a_comma_in_format_specifier@TestCase.test_with_an_underscore_and_a_comma_in_format_specifier  r  r  c                $   V P                  \        R 4      ;_uu_ 4        \        RRR4       RRR4       V P                  \        R4      ;_uu_ 4        \        RRR4       RRR4       R#   + '       g   i     LF; i  + '       g   i     R# ; i)z!can't use starred expression herezf'{*a}'rt  rF   Nr  zf'{**a}'ru  r?   s   &r   )test_syntax_error_for_starred_expressions2TestCase.test_syntax_error_for_starred_expressions  sy    ##K1TUUIsF+ V ##K$VX XJV,X X VUX X Xs   A+A>+A;	>B	c                ,   V P                  \        R RR.4       V P                  \        RRR.4       Rp \        VRR4       R
#   \         dD   pT P                  TP                  R	4       T P                  TP
                  ^4        R
p?R
# R
p?ii ; i)zunterminated f-string literalzf"r  z+unterminated triple-quoted f-string literalzf"""zf'''zNx = 1 + 1
y = 2 + 2
z = f"""
sdfjnsdfjsdf
sdfsdfs{1+
2} dfigdf {3+
4}sdufsd""
rt  rF   zz = f"""N)r   r   rI   r2   textrV   )r   dataes   &  r   test_not_closing_quotes TestCase.test_not_closing_quotes  s    K)H4QU,WK)V#V,	.	*D#v& 	*QVVZ0QXXq))	*s   A B8BBc                j    V P                  \        R . RO4       V P                  \        RRR.4       R# )r  rs  z
f'{1=}{1;'zf'{1=}{1;}'N)z	f'{1=}{;'z
f'{1=}{+;'zf'{1=}{2}{;'zf'{1=}{3}{;'r   r?   s   &r   test_syntax_error_after_debug&TestCase.test_syntax_error_after_debug  s:    K)[	 	K)Z , -	r    c           	        \        4       ;_uu_ 4        R p\        R R4      ;_uu_ 4       pVP                  R4       RRR4       \        V4      w  r4pRRR4       V P	                  XP                  R4      P                  4       P                  RR4      P                  RR4      R4       R#   + '       g   i     Lw; i  + '       g   i     Lt; i)		script.pyr  zprint(f'''{
3
=}''')Nr0  z
r   z3
=3)r   r8  r9  r   r2   decodestripr  )r   scriptr   ry   stdouts   &    r   test_debug_in_fileTestCase.test_debug_in_file  s    ZZ Fk3''1   ( ,F3LAq  	w/557??MUUVZ\`a 	" (' Zs!   B>B+	B>+B;6B>>C	c           	        \        4       ;_uu_ 4        R p\        VR4      ;_uu_ 4       pVP                  R4       RRR4       \        V4      w  r4pV P	                  RV4       V P                  \        VP                  4       P                  4       4      ^4       RRR4       R#   + '       g   i     Lq; i  + '       g   i     R# ; i)r  r  zprint(f'\{1}')Ns   \1)	r   r8  r9  r   r  r2   rS   r  
splitlines)r   r  r   ry   r  r=  s   &     r   .test_syntax_warning_infinite_recursion_in_file7TestCase.test_syntax_warning_infinite_recursion_in_file  s    ZZ Ffc""a)* # !1 8AvMM&&)S!:!:!<=qA Z"" ZZs"   B8B%	AB8%B50B88C		c           	     j    R  pR F)  pV P                  V! RV R24      V! RV R24      4       K+  	  R# )c                     \         P                  ! V 4       Uu. uF  qP                  VP                  3NK  	  up# u upi r   )disget_instructionsopnameoparg)r  r  s   & r   get_codeCTestCase.test_fstring_without_formatting_bytecode.<locals>.get_code  s2    141E1Ea1HI1HAXXqww'1HIIIs    <r  r  N)r/   zsome stringr   )r   r  r  s   &  r   (test_fstring_without_formatting_bytecode1TestCase.test_fstring_without_formatting_bytecode  s>    	J %AX!Ah/Bqc)1DE %r    c                   V P                  R ^^8H  : 2R4       V P                  R^^8H  : 2R4       V P                  R^^8g  : 2R4       V P                  R^^8g  : 2R4       V P                  R^^8g  : 2R	4       V P                  R
^^8g  : 2R4       T P                  R^^u;8g  ;'       d    ^u;8H  ;'       d    ^8g  Mu : 2R4       T P                  R^^u;8H  ;'       d    ^u;8g  ;'       d    ^8H  Mu : 2R4       V P                  RR ^^8H  : 2: 2R4       V P                  RR^^8H  : 2: 2R4       V P                  RR^^8g  : 2: 2R4       V P                  RR^^8g  : 2: 2R4       R# )z1==2=z
1==2=Falsez1 == 2=z1 == 2=Falsez1!=2=z	1!=2=Truez1 != 2=z1 != 2=Truez	(1) != 2=z(1) != 2=Truez(1*2) != (3)=z(1*2) != (3)=Truez1 != 2 == 3 != 4=z1 != 2 == 3 != 4=Falsez1 == 2 != 3 == 4=z1 == 2 != 3 == 4=Falsezf'{1==2=}'=zf'{1==2=}'='1==2=False'zf'{1 == 2=}'=zf'{1 == 2=}'='1 == 2=False'zf'{1!=2=}'=zf'{1!=2=}'='1!=2=True'zf'{1 != 2=}'=zf'{1 != 2=}'='1 != 2=True'Nr   r?   s   &r   test_gh129093TestCase.test_gh129093   s   EAqD7\2GAF9~6EAqD7[1GAF9}5IQ1H;9MSaL?+-@A-A,,a,,1,./1IJ-A,,a,,1,./1IJKuq!tgJ=)+DEMwqAviL?+-JKKuq!tgJ=)+CDMwqAviL?+-IJr    c                p    . ROpV P                  \        RV4       RR.pV F  p\        VRR4       K  	  R# )	f'{1:d
}'z7f-string: newlines are not allowed in format specifiersz.f'''__{
                1:d
            }__'''zf'''{1:d
}'''re  rF   N)r  z*f'__{
                1:d
            }__'z"f"{value:.
               {'2f'}}"z#f"{value:
               {'.2f'}f}"z"f"{value:
                #{'x'}}")r   r   rI   )r   rQ  valid_casesru  s   &   r   "test_newlines_in_format_specifiers+TestCase.test_newlines_in_format_specifiers  sH    
 	K)bdij !	
  DD*f-  r    c                    ! R  R4      pV P                  V! 4       R R4       V P                  V! 4       R R4       V P                  V! 4       R  R4       V P                  V! 4       R  R4       V P                  V! 4       R  R4       V P                  V! 4       R  R4       V P                  V! 4       R  R4       V P                  V! 4       R RV! 4       R 2R4       R# )	c                   &   a  ] tR tRt o R tRtV tR# )>TestCase.test_raw_fstring_format_spec.<locals>.UnchangedFormati/  c                    V# r   r   )r   r3   s   &&r   r   ITestCase.test_raw_fstring_format_spec.<locals>.UnchangedFormat.__format__1  s    r    r   Nr!   r(   s   @r   UnchangedFormatr  /  s      r    r     ÿz\xFFabr   rh  z\xFF \nNr   )r   r  s   & r   test_raw_fstring_format_spec%TestCase.test_raw_fstring_format_spec*  s   
	 	 	O-d3d;_.t4w? 	_.x84@O-wi87C_.y9GD 	o/ 2 1 "&	(0 3 2 #'	) 	_.t4Ao6G5KLkZr    r   N)dr"   r#   r$   r%   r   r7   rO   rf   rm   rq   rt   r{   r~   r   r   r   r   r   r   r   r   r   r  skipIfr   is_wasir   r   r   r   r   r   r  r  r&  r2  r6  r:  r=  rE  rH  rL  rR  rU  rY  rf  ri  rl  rz  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>  rA  rF  rI  rd  rl  rp  rv  r~  r  r  r  r  r  r  r  r  r  r  r  r  r&   r'   r(   s   @r   r   r       s2    =6"04>26h+.Z@5D2.MM^q5f5$->`%%' $
  __W__&FGD HD. __W__&FGA HA4;! F# J1 f02 BA	,< |
 6
84t & #&W
'8'
9/&@,Q	(7
I3,40)?@//
E6	(0-7 r  (8T$&L.	:	M6	/.u2@7 /




-*&"BFK".2[ [r    r   __main__)rG   r`  r  r5  rz  r0   r  r  r}  r$  r   test.support.os_helperr   test.support.script_helperr   r   r  r   r"   mainr   r    r   <module>r     s_      
 	 	      + Nd[x   d[N9 zMMO r    