+
    Bi                        ^ RI t ^ RIt^ RIHt ^ RIHt ]! 4       tRR RR RR RR RR RR	 RR
 RR /t ! R R4      t	 ! R R] P                  4      t ! R R] P                  4      t]R8X  d   ] P                  ! 4        R# R# )    N)StringIO)supportc                     \        V !  # Nprintargssependfiles   &&&&&/usr/lib/python3.14/test/test_print.py<lambda>r      s    UD\    c                     \        V R V/ # r   r   r	   s   &&&&r   r   r      s    Ut%<%<r   c                     \        V R V/ # r   r   r	   s   &&&&r   r   r          UT%:s%:r   c                     \        V R VRV/ # )r   r   r   r	   s   &&&&r   r   r          U%Es%E%Er   c                     \        V R V/ # r   r   r	   s   &&&&r   r   r      r   r   c                     \        V R VRV/ # )r   r   r   r	   s   &&&&r   r   r      r   r   c                     \        V R VRV/ # r   r   r   r	   s   &&&&r   r   r      s    Ud%Cs%C%Cr   c           	           \        V R VRVRV/ # r   r   r   r   r	   s   &&&&r   r   r      s    U%Ns%N%N$%Nr   c                   ,   a  ] tR t^#t o R tR tRtV tR# )ClassWith__str__c                    Wn         R # r   xselfr#   s   &&r   __init__ClassWith__str__.__init__$   s    r   c                    V P                   # r   r"   r%   s   &r   __str__ClassWith__str__.__str__'   s    vvr   r"   N)__name__
__module____qualname____firstlineno__r&   r*   __static_attributes____classdictcell____classdict__s   @r   r    r    #   s      r   r    c                   F   a  ] tR t^+t o Rt]]]3R ltR tR tR t	Rt
V tR# )	TestPrintz-Test correct operation of the print function.c                   \         V\        JV\        JV\        J3,          p\        P                  ! 4       ;_uu_ 4       pV! W#WE4       R R R 4       V P	                  XP                  4       V4       R #   + '       g   i     L2; ir   )dispatch
NotDefinedr   captured_stdoutassertEqualgetvalue)r%   expectedr
   r   r   r   fnts   &&&&&&  r   checkTestPrint.check.   sm     s*,*,:-/ 0 $$&&!t#$ ' 	x0 '&s    
A44B	c                v  a  \         \         3V 3R  llpV! RR4       V! RR4       V! RR4       V! RR4       V! RR4       V! RRRR	7       V! R
RRR7       V! RRRR	7       V! RR RRR7       V! RR!RRR7       V! RR"RR	7       V! RR#RR	7       V! RR"4       V! RR"RR	7       V! RR"RR7       V! RR"RRR7       V! R\        R4      34       V! R\        R4      ^34       S P                  \        \        R^R	7       S P                  \        \        R^R7       S P                  \
        \        RRR7       R# )$c                    < SP                  WW#R 7       \        4       pSP                  RWW4R7       SP                  VP                  4       V 4       R# )r    r   N)r?   r   r:   r;   )r<   r
   r   r   or%   s   &&&& r   r#   TestPrint.test_print.<locals>.x@   sH     JJx3J8 
AJJr4cJ: QZZ\84r   
a
zNone
Nz1 2
z1   2
z1*2
*r   z1 srC   r   za
b
z1.01r   z1*a*1.3++za

b
z + + 
za
 b
z*
zabc 1
abcr    )ar   )      )rM    rN   )rM   s)rL   b)g      ?rM   )rM   rL   g?)rG   rQ   ) rO   rR   )r8   r    assertRaises	TypeErrorr   AttributeErrorr$   s   f r   
test_printTestPrint.test_print?   s8   ",* 	5 	
$	%	(G	'6	)[!	'6s#	%r"	(JD)	&(+	*m#6	*l-	+(c2	)\"	)\t,	)\t,	)\t6	%"3')*	)&u-q12 	)UBA6)UBA6.%"=r   c                J    ! R  R4      pV! 4       p\        ^VRRR7       \        ^VRRR7       \        ^VRR7       V P                  VP                  R4       V P                  VP                  ^4        ! R R	4      pV P	                  \
        \         ^V! 4       RR7       R
# )c                   2   a  ] tR t^it o R tR tR tRtV tR# ),TestPrint.test_print_flush.<locals>.filelikec                "    R V n         ^ V n        R# )rC   N)writtenflushedr)   s   &r   r&   5TestPrint.test_print_flush.<locals>.filelike.__init__j   s    ! r   c                8    V ;P                   V,          un         R # r   )r\   r%   strs   &&r   write2TestPrint.test_print_flush.<locals>.filelike.writen   s    #r   c                8    V ;P                   ^,          un         R# )rM   N)r]   r)   s   &r   flush2TestPrint.test_print_flush.<locals>.filelike.flushq   s    !r   )r]   r\   N)	r,   r-   r.   r/   r&   rb   re   r0   r1   r2   s   @r   filelikerZ   i   s     !$" "r   rg   rC   T)r   r   re   F)r   re   z123
c                   ,   a  ] tR t^|t o R tR tRtV tR# )+TestPrint.test_print_flush.<locals>.noflushc                    R # r   rK   r`   s   &&r   rb   1TestPrint.test_print_flush.<locals>.noflush.write}   s    r   c                    \         hr   )RuntimeErrorr)   s   &r   re   1TestPrint.test_print_flush.<locals>.noflush.flush   s    ""r   rK   N)r,   r-   r.   r/   rb   re   r0   r1   r2   s   @r   noflushri   |   s     # #r   ro   N)r   r:   r\   r]   rS   rm   )r%   rg   fro   s   &   r   test_print_flushTestPrint.test_print_flushg   s    		" 		" JaaRt,aaRt,aau%G,A&	# 	# 	,qwyMr   c                     ! R  R4      p\         P                  ! \        RR4      ;_uu_ 4        \        4       \        n        \        V! 4       4       RRR4       R#   + '       g   i     R# ; i)c                   &   a  ] tR t^t o R tRtV tR# )"TestPrint.test_gh130163.<locals>.Xc                V    \        4       \        n        \        P                  ! 4        R # )foo)r   sysstdoutr   
gc_collectr)   s   &r   r*   *TestPrint.test_gh130163.<locals>.X.__str__   s    %Z
""$r   rK   N)r,   r-   r.   r/   r*   r0   r1   r2   s   @r   Xru      s      r   r|   ry   N)r   	swap_attrrx   r   ry   r   )r%   r|   s   & r   test_gh130163TestPrint.test_gh130163   sD    	 	 sHd33!CJ!#J 4333s   $AA.	rK   N)r,   r-   r.   r/   __doc__r8   r?   rV   rq   r~   r0   r1   r2   s   @r   r5   r5   +   s,     7 *:1"&>PN:	 	r   r5   c                   H   a  ] tR t^t o RtR tR tR tR tR t	R t
RtV tR	# )
TestPy2MigrationHintzoTest that correct hint is produced analogous to Python3 syntax,
if print statement is executed as in Python 2.
c                    R pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zprint "Hello World"N?Missing parentheses in call to 'print'. Did you mean print(...)rS   SyntaxErrorexecassertInra   	exceptionr%   python2_print_strcontexts   &  r   test_normal_string'TestPy2MigrationHint.test_normal_string   Q    1{++w"# , 	WG%%&	( ,+   AA+	c                    R pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zprint "Hello World",Nr   r   r   s   &  r   test_string_with_soft_space0TestPy2MigrationHint.test_string_with_soft_space   sQ    2{++w"# , 	WG%%&	( ,+r   c                    R pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zprint  "Hello World", Nr   r   r   s   &  r   %test_string_with_excessive_whitespace:TestPy2MigrationHint.test_string_with_excessive_whitespace   sQ    4{++w"# , 	WG%%&	( ,+r   c                    R pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)z.if 1:
            print "Hello World"
        Nr   r   r   s   &  r   #test_string_with_leading_whitespace8TestPy2MigrationHint.test_string_with_leading_whitespace   sU     {++w"# , 	WG%%&	( ,+r   c                    R pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zprint p;Nr   r   r   s   &  r   test_string_with_semicolon/TestPy2MigrationHint.test_string_with_semicolon   sQ    &{++w"# , 	WG%%&	( ,+r   c                    R pV P                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)zfor i in s: print iNr   r   r   s   &  r    test_string_in_loop_on_same_line5TestPy2MigrationHint.test_string_in_loop_on_same_line   r   r   rK   N)r,   r-   r.   r/   r   r   r   r   r   r   r   r0   r1   r2   s   @r   r   r      s-     (((((( (r   r   __main__)FFF)FFT)FTF)FTT)TFF)TFT)TTF)TTT)unittestrx   ior   testr   objectr8   r7   r    TestCaser5   r   r,   mainrK   r   r   <module>r      s     
  X
 1<:E:ECN!* b!! bJ8(8,, 8(v zMMO r   