python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_print.cpython-312.opt-1.pyc

Αe	ddlZddlZddlmZddlmZeZdddddd	d
ddZGd
dZ	GddejZGddejZe
dk(rejyy)N)StringIO)supportct|SNprintargssependfiles    C/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_print.py<lambda>rs
UD\ct|d|iS)Nr
rr	s    rrrsUt%<%<rct|d|iS)Nrrr	s    rrrUT%:s%:rct|||dS)N)rr
rr	s    rrrUs%Erct|d|iS)Nrrr	s    rrrrrct|||dS)N)rr
rr	s    rrrrrct|||dS)Nrrrr	s    rrrsUds%Crct||||dS)Nrrr
rr	s    rrrsUs$%Nr))FFF)FFT)FTF)FTT)TFF)TFT)TTF)TTTceZdZdZdZy)ClassWith__str__c||_yrxselfr s  r__init__zClassWith__str__.__init__$s	rc|jSrrr"s r__str__zClassWith__str__.__str__'svv
rN)__name__
__module____qualname__r#r&rrrr#srrc*eZdZdZeeefdZdZdZy)	TestPrintz-Test correct operation of the print function.ct|tu|tu|tuf}tj5}|||||ddd|j	j|y#1swY*xYwr)dispatch
NotDefinedrcaptured_stdoutassertEqualgetvalue)r"expectedr
rrr
fnts        rcheckzTestPrint.check.sus*,*,:-/0
$
$
&	%!tS#t$	%	
x0	%	%sA((A1cpttffd	}|dd|dd|dd|dd	|d
d|dd	d
|ddd|ddd|dddd|ddd
d|ddd|ddd|dd|ddd|ddd|dddd|d td
f|d!td"d#fjttdd$jttdd$jt
tdd%y)&Ncj||||t}jd||||j|j|y)Nrr)r6rr1r2)r3r
rror"s     rr zTestPrint.test_print.<locals>.x@sP
JJx3CJ8
AJJr4ScJ:
QZZ\84r
r*a
)azNone
rz1 2
)z1   2
)r> r?z1*2
*)rz1 s)r>sr9)rza
b
)r=bz1.01)g?r>rz1*a*1.3+)r>r=g?+za

b
)r<rCz+ +
)r@rEza
 b
z*
zabc 1
abcr>)r
)r/rassertRaises	TypeErrorrAttributeErrorr!s` r
test_printzTestPrint.test_print?s8",*	5	
$	%	(G	'6	)[!	'6s#	%r"	(JD)	&(+	*m#6	*l-	+(c2	)\"	)\t,	)\t,	)\t6	%"3')*	)&u-q12	
)UBA6)UBA6.%"=rcHGdd}|}td|ddtd|ddtd|d	
|j|jd|j|jdGdd
}|j	t
td|d
y)NceZdZdZdZdZy),TestPrint.test_print_flush.<locals>.filelikec d|_d|_y)Nr9r)writtenflushedr%s rr#z5TestPrint.test_print_flush.<locals>.filelike.__init__js! rc.|xj|z
c_yr)rPr"strs  rwritez2TestPrint.test_print_flush.<locals>.filelike.writens#rc.|xjdz
c_y)Nr>)rQr%s rflushz2TestPrint.test_print_flush.<locals>.filelike.flushqs!rN)r'r(r)r#rUrWr*rrfilelikerNis
!
$
"rrXr>r9T)r
rrWr?rGF)r
rWz123
ceZdZdZdZy)+TestPrint.test_print_flush.<locals>.noflushcyrr*rSs  rrUz1TestPrint.test_print_flush.<locals>.noflush.write}srctr)RuntimeErrorr%s rrWz1TestPrint.test_print_flush.<locals>.noflush.flushs""rN)r'r(r)rUrWr*rrnoflushrZ|s

#rr^)rr1rPrQrHr])r"rXfr^s    rtest_print_flushzTestPrint.test_print_flushgs		"		"
J
aaRt,
aaRt,
aau%G,A&	#	#	
,qwyMrN)r'r(r)__doc__r/r6rKr`r*rrr,r,+s7*:1"&>PNrr,c:eZdZdZdZdZdZdZdZdZ	dZ
y	)
TestPy2MigrationHintzwTest that correct hint is produced analogous to Python3 syntax,
    if print statement is executed as in Python 2.
    cd}|jt5}t|ddd|jdt	j
y#1swY/xYw)Nzprint "Hello World"?Missing parentheses in call to 'print'. Did you mean print(...)rHSyntaxErrorexecassertInrT	exceptionr"python2_print_strcontexts   rtest_normal_stringz'TestPy2MigrationHint.test_normal_stringU1


{
+	$w"#	$	


WG%%&	(	$	$AAcd}|jt5}t|ddd|jdt	j
y#1swY/xYw)Nzprint "Hello World",rerfrks   rtest_string_with_soft_spacez0TestPy2MigrationHint.test_string_with_soft_spacesU2


{
+	$w"#	$	


WG%%&	(	$	$rpcd}|jt5}t|ddd|jdt	j
y#1swY/xYw)Nzprint  "Hello World", rerfrks   r%test_string_with_excessive_whitespacez:TestPy2MigrationHint.test_string_with_excessive_whitespacesU4


{
+	$w"#	$	


WG%%&	(	$	$rpcd}|jt5}t|ddd|jdt	j
y#1swY/xYw)Nz.if 1:
            print "Hello World"
        rerfrks   r#test_string_with_leading_whitespacez8TestPy2MigrationHint.test_string_with_leading_whitespacesY

{
+	$w"#	$	


WG%%&	(	$	$rpcd}|jt5}t|ddd|jdt	j
y#1swY/xYw)Nzprint p;rerfrks   rtest_string_with_semicolonz/TestPy2MigrationHint.test_string_with_semicolonsU&


{
+	$w"#	$	


WG%%&	(	$	$rpcd}|jt5}t|ddd|jdt	j
y#1swY/xYw)Nzfor i in s: print irerfrks   r test_string_in_loop_on_same_linez5TestPy2MigrationHint.test_string_in_loop_on_same_linerorpcp|jt5}ttjz	dfddd|jdt
j|jt5}tdz	ddd|jdt
|j|jt5}ttjz	ddd|jdt
|j|jt5}ttjzddd|jdt
|jGdd}|jt|z	dy#1swYXxYw#1swYxYw#1swYxYw#1swY}xYw)Nmessagez6Did you mean "print(<message>, file=<output_stream>)"?*z
Did you mean zDid you meanceZdZdZy)\TestPy2MigrationHint.test_stream_redirection_hint_for_py2_migration.<locals>.OverrideRRShiftcy)Nr}r*)r"lhss  r__rrshift__zhTestPy2MigrationHint.test_stream_redirection_hint_for_py2_migration.<locals>.OverrideRRShift.__rrshift__srN)r'r(r)rr*rrOverrideRRShiftrs
rr)rHrIrsysstderrrirTrjmaxassertNotInr1)r"rmrs   r.test_stream_redirection_hint_for_py2_migrationzCTestPy2MigrationHint.test_stream_redirection_hint_for_py2_migrationsf


y
)	+WSZZ*	+

*+.w/@/@+A	C


y
)	WRK	

*+.w/@/@+A	C

y
)	W3::	#g.?.?*@A

y
)	 WSZZ	 W->->)?@			
/"33R87	+	+				
	 	 s/F2
F>F F,FF F),F5N)r'r(r)rarnrrrtrvrxrzrr*rrrcrcs*((((((9rrc__main__)unittestriortestrobjectr/r.rTestCaser,rcr'mainr*rr<module>rs

X
	2<:E:ECN!*WN!!WNtW98,,W9vzHMMOr