python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_builtin.cpython-311.opt-1.pyc

ekddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlmZddlmZddlmZddlmZddlmZddlmZmZmZddl m!Z!dd	l"m#Z#dd
l$m%Z%m&Z&ddl'm(Z(m)Z)m*Z*ddl+m,Z,dd
l-m.Z.ddl/m0Z0m1Z1	ddl2Z2ddl3Z3n#e4$rdxZ2Z3YnwxYwGddZ5GddZ6GddZ7dddddddddde8ej9ej9fde:fd d!e:fd"e:fd#e:fd$e:fe;d%d&d'fe<d(e:fgZ=dddddddd)e:fdd*e:fe8ej9ej9fde:fd+e:fd!e:fd"e:fd#e:fd$e:fe;d%d&d'fe<d(e:fgZ>Gd,d-Z?Gd.d/Z@d0ZAd1ZBGd2d3ejCZDGd4d5ejCZEejFe2d6Gd7d8ejCZGGd9d:ejCZHGd;d<ejCZIGd=d>ejCZJd?ZKeLd@krejMdSdS)AN)	ExitStack)partial)CO_COROUTINE)product)dedent)AsyncGeneratorTypeFunctionTypeCellType)neg)support)	swap_attrmaybe_get_event_loop_policy)EnvironmentVarGuardTESTFNunlink)assert_python_ok)check_warnings)	MagicMockpatchc eZdZdZdZdZdS)Squaresc"||_g|_dSNmaxsofarselfrs  E/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_builtin.py__init__zSquares.__init__+


c*t|jSrlenrrs r__len__zSquares.__len__/sc$*oo-r"cd|cxkr|jks	ntt|j}||kr(|j||z|dz
}||k(|j|SNr)r
IndexErrorr%rappendrins   r__getitem__zSquares.__getitem__1szA        
"2
OO1ffJac"""
FA1ffz!}r"N__name__
__module____qualname__r r'r0r"rrr)s=.--r"rc eZdZdZdZdZdS)
StrSquaresc"||_g|_dSrrrs  rr zStrSquares.__init__;r!r"c*t|jSrr$r&s rr'zStrSquares.__len__?s4:r"cd|cxkr|jks	ntt|j}||kr5|jt||z|dz
}||k5|j|Sr))rr+r%rr,strr-s   rr0zStrSquares.__getitem__BsA        
OO1ffJc!A#hh'''
FA1ffz!}r"Nr1r5r"rr7r79sAr"r7ceZdZdZdS)	BitBucketcdSrr5)rlines  rwritezBitBucket.writeLsr"N)r2r3r4r@r5r"rr=r=Ks#




r"r=)0r)1r*)9	)10
)99c)100d)314:) 314rL)z314 rL)  		  314  		  rLz  1x)  1  r*z  1   z  		  s\u0663\u0661\u0664 zraw-unicode-escaperLirMrNrOceZdZdZdS)TestFailingBoolctrRuntimeErrorr&s r__bool__zTestFailingBool.__bool__|r"N)r2r3r4rWr5r"rrSrS{#r"rSceZdZdZdS)TestFailingIterctrrUr&s r__iter__zTestFailingIter.__iter__rXr"Nr2r3r4r]r5r"rr[r[rYr"r[cBt|tdkS)Nd)ordargs rfilter_charrdss88c#hhr"c@tt|dzSNr*)chrrarbs rmap_charrhss3xxz??r"ceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZejejpejd
dZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$ej%dd Z&d!Z'd"Z(d#Z)d$Z*d%Z+d&Z,d'Z-d(Z.d)Z/d*Z0d+Z1d,Z2d-Z3d.Z4d/Z5d0Z6d1Z7eje8j9j:d2d3Z;ej<d4Z=d5Z>d6Z?d7Z@d8ZAd9ZBeCjDEd:o!eCjFEd;ZGeHd<d<kZIejeGoeId=d>ZJd?ZKd@ZLdAZMdBZNeOdCZPeOdDZQGdEdFeRZSdGZTdHZUdIZVdJZWdKZXdLZYdMZZdNZ[dOZ\dPZ]dQZ^ej_dRZ`dSZadTZbdUZcdVZddWZedXZfdYZgdZZhd[S)\BuiltinTestc|}tj||}tj|}|t	|t	||t||tj|}	t
|n#t$rYdSwxYwtj||}tj|}|t||dddSrf)pickledumpsloadsassertEqualtypelistnext
StopIteration)ritseqprotoitorgr`s      rcheck_iter_picklezBuiltinTest.check_iter_picklesLU##
\!__ed2hh///b3'''\!__	HHHH			FF	LU##
\!__b3qrr7+++++sB$$
B21B2c
tdtdtdtdtdd|ttd|ttdd	d
d|ttd|ttdd|t5|ttdddd
didddddn#1swxYwY|ttddS)Nsystimestringnamer)r~levelspamspamr*rP__main__)__package____spec__r2)foo)localsfromlistrzstring)
__import__assertRaisesModuleNotFoundError	TypeError
ValueErrorassertWarns
ImportWarningImportErrorr&s rtest_importzBuiltinTest.test_imports568a((((-z:FFF)ZAq!<<<*j"555)ZUCCC


m
,
,	E	Ek:r.2R\]]%'(!

E
E
E	E	E	E	E	E	E	E	E	E	E	E	E	E	E	E
	
-z<HHHHHs2+D))D-0D-c|tdd|tdd|tdd|ttjdz
dk|tdd|tdd|tdd|ttd|td	d|td
d|tt|ttdGddt}|t|d
dS)Nri.r*gQ	@gQ	aTFceZdZdZdS)&BuiltinTest.test_abs.<locals>.AbsClasscdS)Nr5r&s r__abs__z.BuiltinTest.test_abs.<locals>.AbsClass.__abs__rr"N)r2r3r4rr5r"rAbsClassr#




r"rr)roabs
assertTruerzmaxsizerrobject)rrs  rtest_abszBuiltinTest.test_abssQ###TD)))UT***S[LN++a/000S3'''TD)))UT***)S#...TA&&&UQ''')S))))S$///					v				
XXZZ"-----r"c|tgdd|tgdd|ttdt	dg|ttt|ttd|tt|ttgdg|tgd|tdt	gdd	d
g}|td|Ddgd}|td
|DddS)NrrT)rNrFrrrFr2<c3"K|]
}|dkVdS*Nr5.0xs  r	<genexpr>z'BuiltinTest.test_all.<locals>.<genexpr>&//QV//////r")r(rc3"K|]
}|dkVdSrr5rs  rrz'BuiltinTest.test_all.<locals>.<genexpr>rr")roallrrVrSr[rrSs  rtest_allzBuiltinTest.test_allsYYY...\\\**E222,a1B1BA-FGGG,_->->???)S"---)S))))S)))R888R$'''a!2!2344e<<<
H//Q/////666LL//Q/////77777r"c|tgdd|tgdd|ttdt	dg|ttt|ttd|tt|ttgdg|tgd|tdt	gdgd	}|td
|Ddgd}|td|DddS)
N)NNNF)NrNTrrFrr*)rrc3"K|]
}|dkVdSrr5rs  rrz'BuiltinTest.test_any.<locals>.<genexpr>rr")rFrc3"K|]
}|dkVdSrr5rs  rrz'BuiltinTest.test_any.<locals>.<genexpr>rr")roanyrrVrSr[rrs  rtest_anyzBuiltinTest.test_anys///00%888___--t444,dO4E4Eq-IJJJ,_->->???)S"---)S))))S)))R888R%(((a!2!2344d;;;LL//Q/////666LL//Q/////77777r"ctddtddtddtgdtidg}||t|d	i}||d<t|d
fd}|d|d
|d|d|d|d|d|d|d|dtddd}t|ddS)NrP''rrAr5()[]{}[[...]]
{0: {...}}cht|t|dSr)roasciirepr)srs r
_check_uniz*BuiltinTest.test_ascii.<locals>._check_unis+U1XXtAww/////r"'"z"'z
	 .…u῿u𒿿uuu𝄡z'\U0001d121'u'"

	 abcd…é𒿿𝄡xxx.z:'\'\x00"\n\r\t abcd\x85\xe9\U00012fff\ud800\U0001d121xxx.')rorr,)rrrrs`   r
test_asciizBuiltinTest.test_asciisrF+++q3'''rD)))rD)))rD)))	q9---!q<000	0	0	0	0	0
3
3
5
4
:
6
8
<   
8
8	
|,,o>>>BqM	O	O	O	O	Or"ctjdz
}|t|t||tjdzdSrf)rzrr
isinstanceintrorrs  rtest_negzBuiltinTest.test_negsO
[LN
1c**+++!S[]+++++r"c|tt|td|tt|td|ttd}|t|Gdd}|t||}|t|j|t|d|_|t|d|_|t||`|t|Gddt}|}|t|d|_|t|Gd	d
|}|}|t|dS)Nrc||zSrr5rys  r<lambda>z+BuiltinTest.test_callable.<locals>.<lambda>s
a!er"cdSrr5r5r"rfz$BuiltinTest.test_callable.<locals>.fr"ceZdZdZdS)%BuiltinTest.test_callable.<locals>.C1cdSrr5r&s rmethz*BuiltinTest.test_callable.<locals>.C1.methrr"N)r2r3r4rr5r"rC1rs     r"rcdSNrr5r&s rrz+BuiltinTest.test_callable.<locals>.<lambda>s!r"ceZdZdZdS)%BuiltinTest.test_callable.<locals>.C2cdSrr5r&s r__call__z.BuiltinTest.test_callable.<locals>.C2.__call__$rr"N)r2r3r4rr5r"rC2r#s$$$$$r"rceZdZdS)%BuiltinTest.test_callable.<locals>.C3Nr2r3r4r5r"rC3r)r"r)rcallabler%assertFalse__builtins__rrr)rrrcrc2rc3s        r
test_callablezBuiltinTest.test_callables<

&&&#'''**+++!3!344555,//000

$$$	!	!	!	!	!	!	!	!%%%BDD(()))!%%%
!%%%#^
!%%%
J!%%%	%	%	%	%	%	%	%	%
RTT%%%%%%
RTT%%%%%r"c|tdd|tdd|tdd|tdd|ttd	|ttjt
d
dd|tt|td
d|tdd|tdd|tdd|tdd|tdd|tdd|tdd|tdd|ttd|ttd |ttftd!dS)"N rQAAarÿiz
\U0010ffffrzunicode-escape￿𐀀𐀁󿿾󿿿􀀀􀀁􏿾􏿿il)
rorgrrrz
maxunicoder;encoder
OverflowErrorr&s rtest_chrzBuiltinTest.test_chr-s2R#&&&R#&&&R#&&&TF+++*c5111S^,,]11'::<LMM	O	O	O)S)))Z,777Z,777Z,777Z,777Z,777Z,777Z,777Z,777Z,777*c2...*c:666=*5sEBBBBBr"cX|ttddS)Ncmp)rhasattrbuiltinsr&s rtest_cmpzBuiltinTest.test_cmpCs'GHe44455555r"c
tdddd}t|dzddtdddtd	d
dd
tddddttddd|tt|ttddd|ttdddd|ttdddddd
tddd|t
tt
ddd|tttdddd}d}dd	|jd	d	fd d!d"g}|D]^}}g}|	t|d#d|$tj|}|	t|d#d|$|D]G}	i}
t|	|
|
d}|
|t|HdS)%Nz	print(1)
rPexecs	print(1)
pass?)sourcefilenamemodeFtmprAeval)dont_inheritrrrT)r!rstextr~z
print(42)
<string>badmodesingler)rrruprint("å")
rrza = 1badaJdef f():
        """doc"""
        debug_enabled = False
        if __debug__:
            debug_enabled = True
        try:
            assert False
        except AssertionError:
            return (True, f.__doc__, debug_enabled, __debug__)
        else:
            return (False, f.__doc__, debug_enabled, __debug__)
        cdS)docNr5r5r"rrz#BuiltinTest.test_compile.<locals>.ferr"r
)rTr'TT)r*Fr'FF)rFNFFz<test>)optimize)compile
memoryviewrrrSyntaxErrorrgr;__doc__r,astparserrotuple)rbomcodestrrvaluesoptvalexpectedcodeobjstreecodensrvs            rtest_compilezBuiltinTest.test_compileFsfb&)))m#R000v&9999UU3VLLLL$V<<<<
7##VV444)W---*g}j)TTT*g}j(TXYYY)Wfc6%cE		C	C	C!2v...+wAVDDD*gs7||S%HHH	y!)Y	B.102"(
	6
	6FXHOOGGXvOOOPPP9W%%DOOGD(FVLLLMMM 
6
6T2RWYY  U8__5555	
6
	6
	6r"c	d}gd}t||D]a\}}t|}t|d|tj}||jtztd|d|bdS)	zCMake sure top level non-await codes get the correct coroutine flagsr$r)z
def f():pass
z[x for x in l]z{x for x in l}z(x for x in l)z{x:x for x in l}rflagssource= mode=msgN)rrr)r-PyCF_ALLOW_TOP_LEVEL_AWAITassertNotEqualco_flagsr)rmodescode_samplesrcode_samplercos       r$test_compile_top_level_await_no_coroz0BuiltinTest.test_compile_top_level_await_no_corovs"


")!=!=	D	DD+K((F "%"@BBBB

l :L$Bf$B$BD$B$B
 
D
D
D
D	D	Dr"zsocket.accept is brokenc	Hd}d}gd}t}	t||D]I\}}t|}|td|d|5t|d|dddn#1swxYwYt|d|tj	}||j	tztd|d|td
|d}	t||	}
tj
|
||	dd
td
|d}	tj
t||	||	dd
K	tj|dS#tj|wxYw)aITest whether code some top level await can be compiled.

        Make sure it compiles only with the PyCF_ALLOW_TOP_LEVEL_AWAIT flag
        set, and make sure the generated code object has the CO_COROUTINE flag
        set in order to execute it with  `await eval(.....)` instead of exec,
        or via a FunctionType.
        c8Kt|D]}|WVdSrranger/r.s  rarangez8BuiltinTest.test_compile_top_level_await.<locals>.arange21XX



r"r<)
z$a = await asyncio.sleep(0, result=1)z2async for i in arange(1):
                   a = 1z8async with asyncio.Lock() as l:
                   a = 1z#a = [x async for x in arange(2)][1]z%a = 1 in {x async for x in arange(2)}z%a = {x:1 async for x in arange(1)}[0]z<a = [x async for x in arange(2) async for x in arange(2)][1]z6a = [x async for x in (x async for x in arange(5))][1]z.a, = [1 for x in {x async for x in arange(1)}]z;a = [await asyncio.sleep(0, x) async for x in arange(2)][1]r?r@rArNr=r)asynciorrPrr*)rrrrr+r)r-rCrorErrRr	runr set_event_loop_policy)rrPrFrGpolicyrrHrrIglobals_async_fs           rtest_compile_top_level_awaitz(BuiltinTest.test_compile_top_level_awaits4			#





-..	2%,UL%A%A
3
3!k,,&&#)G6)G)G)G)G'II//FC...///////////////V !#&#ACCC
  |!;\%Cv%C%CT%C%C!EEE(/Q&II&r844GGII&&&  #222(/Q&IIDX..///  #2222/
32
)&11111G)&1111s1AF A>2F>B	FB	C.FF!c d}d}gd}t}	t||D]\}}t|}|td|d|5t|d|dddn#1swxYwY|td|d|5t|d|tj}dddn#1swxYwY	tj	|dS#tj	|wxYw)	Nc8Kt|D]}|WVdSrrMrOs  rrPzFBuiltinTest.test_compile_top_level_await_invalid_cases.<locals>.arangerQr"r<)zdef f():  await arange(10)
z(def f():  [x async for x in arange(10)]
z.def f():  [await x async for x in arange(10)]
z_def f():
                   async for i in arange(1):
                       a = 1
            zedef f():
                   async with asyncio.Lock() as l:
                       a = 1
            r?r@rArr=)
rrrrr+r)r-rCrRrT)	rrPrFrGrUrrHrrIs	         r*test_compile_top_level_await_invalid_casesz6BuiltinTest.test_compile_top_level_await_invalid_casess			#


-..	2%,UL%A%A
C
C!k,,&&#)G6)G)G)G)G'II//FC...///////////////&&#)G6)G)G)G)G'IICC  !#&#ACCCBCCCCCCCCCCCCCCC

C
)&11111G)&1111sTAC7A=1C7=B	C7B	%C7*CC7C	C7C	C77D
ctd}t|ddtj}i}t	|||t
|dtdS)z
        With the PyCF_ALLOW_TOP_LEVEL_AWAIT flag added in 3.8, we want to
        make sure AsyncGenerators are still properly not marked with the
        CO_COROUTINE flag.
        z~async def ticker():
                for i in range(10):
                    yield i
                    await asyncio.sleep(0)rrr=tickerN)rr)r-rCrrorpr)rr7rIglobs    rtest_compile_async_generatorz(BuiltinTest.test_compile_async_generatorsv.//
T3c.L
M
M
MRnd8n..//1CDDDDDr"c(dt_ttd|tt|tttd}|t|ttddS)Nr*spam*^attribute name must be string, not 'int'$)rzradelattrrrassertRaisesRegexrrBs  rtest_delattrzBuiltinTest.test_delattrsnV)W---)Wc222;y#wQ?????r"c|ttddd}|dt|dttGddt
j}|d}|tt||dtt|d	ttGd
dt}|}|dt|Gddt}|}|d
t|Gddt}|}|d
t||dt|Gddt}|}|
t|gdkGddt}t|}||t|
|gdkGddt}|}|tt|	t#t$r?}|tt|jdYd}~nd}~wwxYw|t#gtgdS)Nrr*	local_varexitceZdZdZdS)!BuiltinTest.test_dir.<locals>.FooN)r2r3r4__dict__r5r"rFoorksHHHr"rnrstrip__mro__ceZdZdZdS)rkc0d|_d|_d|_dS)NrlrD)rrzr&s rr z*BuiltinTest.test_dir.<locals>.Foo.__init__sr"N)r2r3r4r r5r"rrnz!BuiltinTest.test_dir.<locals>.Foos#




r"rceZdZgZdS)rkN)r2r3r4	__slots__r5r"rrnz!BuiltinTest.test_dir.<locals>.Foo&sIIIr"__repr__ceZdZddgZdZdS)rk	__class__rmcd|_dS)Nwow)barr&s rr z*BuiltinTest.test_dir.<locals>.Foo.__init__/s
 r"N)r2r3r4rvr r5r"rrnz!BuiltinTest.test_dir.<locals>.Foo-s-$j1I
!
!
!
!
!r"r|ceZdZdZdS)rkc
gdS)N)kangaroor5r&s r__dir__z)BuiltinTest.test_dir.<locals>.Foo.__dir__7s++++r"Nr2r3r4rr5r"rrnz!BuiltinTest.test_dir.<locals>.Foo6s#
,
,
,
,
,r")rrrceZdZdZdS)rkcdS)N)brrr5r&s rrz)BuiltinTest.test_dir.<locals>.Foo.__dir__>s&r"Nrr5r"rrnz!BuiltinTest.test_dir.<locals>.Foo=#
'
'
'
'
'r"rrrceZdZdZdS)rkcdS)Nrsr5r&s rrz)BuiltinTest.test_dir.<locals>.Foo.__dir__Fqr"Nrr5r"rrnz!BuiltinTest.test_dir.<locals>.FooEs#




r"r)rrdirassertInrztypes
ModuleTyper;assertNotInrrassertIsInstancerqr+ror%
__traceback__sortedr)rrhrnrreses      rtest_dirzBuiltinTest.test_dirs)S"b111	

k355)))	


fc#hh'''					%"			CJJ)S!,,,	


gs3xx(((CHH---					&			

CEE

c3q66"""					&			CEE

j#a&&)))	!	!	!	!	!&	!	!	!
CEESVV,,,

eSVV$$$	,	,	,	,	,&	,	,	,
CEEA"6"6"66777	'	'	'	'	'&	'	'	'##%%jjc4(((.///					&			
CEE)S!,,,	;	;	;	;SQ_!5!566::::::::	;	


--s2ww77777s
K
L5LLc|tddd|tddd|tddd|tddd|ttjd	z
d
tjd	zdfdD]Z\}}}t||}||d|d||d	|d	[|ttdS)
Nrs)r*i)ri)rr)r*rr*r
r))
@?)@g?)
r)g?)r)rg)rr)rgп)rodivmodrzrassertAlmostEqualrr)rnumdenom
exp_resultresults     rtest_divmodzBuiltinTest.test_divmodTs2A///Q111B222R'222Q33ck!mQ5GHHH'E	=	="C
C''F""6!9jm<<<""6!9jm<<<<)V,,,,,r"c|tdd|tddddd}ddd}|td	|d|td	||d|td
||d|td||dddd}ddd}d}|t|d
z||d|td|d|tt|ttd|tt|ddd
zGdd}|t
tdi|dS)N1+1rz 1+1
r*rr,)rrrrrrau"å"år5ceZdZdZdS) BuiltinTest.test_eval.<locals>.Xctrrrkeys  rr0z,BuiltinTest.test_eval.<locals>.X.__getitem__y  r"Nr2r3r4r0r5r"rXrx#
!
!
!
!
!r"rr)ror rrr+r)rglobalsrr0rs     r	test_evalzBuiltinTest.test_evalfsea(((h+++""%%c7++a000c7F33Q777c7F33S999c7F33S999""%%cDj'6::A>>>h00&999)T***)T2...+tS!Wt^<<<	!	!	!	!	!	!	!	!	
*dE2qqss;;;;;r"cGdd}|}t}|td||d|ttd|||td||td|td||||td	||||ttd|Gd
d}|}|ttd||Gdd
t}|}|td||d|ttd|||td||td|td||||td	|||td||td|tj	Gdd}|}d|d<d|d<d|d<||ddGdd}	|ttdt|	dS)NceZdZdZdZdZdS)(BuiltinTest.test_general_eval.<locals>.Mz9Test mapping interface versus possible calls from eval().c |dkrdStNrrKeyErrorrs  rr0z4BuiltinTest.test_general_eval.<locals>.M.__getitem__s#::2r"c tdSNxyzrqr&s rkeysz-BuiltinTest.test_general_eval.<locals>.M.keysE{{"r"N)r2r3r4r,r0rr5r"rMrs8GG



#
#
#
#
#r"rrrrzdir()rz	globals()zlocals()ceZdZdZdS)(BuiltinTest.test_general_eval.<locals>.AzNon-mappingN)r2r3r4r,r5r"rrrsMDr"rceZdZdZdZdS)(BuiltinTest.test_general_eval.<locals>.DcH|dkrdSt||Sr)dictr0rs  rr0z4BuiltinTest.test_general_eval.<locals>.D.__getitem__s&#::2''c222r"c tdSrrr&s rrz-BuiltinTest.test_general_eval.<locals>.D.keysrr"Nr2r3r4r0rr5r"rDrs2
3
3
3
#
#
#
#
#r"rz[locals() for i in (2,3)]c"eZdZdZiZdZdZdS)2BuiltinTest.test_general_eval.<locals>.SpreadSheetz6Sample application showing nested, calculated lookups.c||j|<dSr)_cells)rrformulas   r__setitem__z>BuiltinTest.test_general_eval.<locals>.SpreadSheet.__setitem__s#*C   r"cRt|j|t|Sr)r rrrs  rr0z>BuiltinTest.test_general_eval.<locals>.SpreadSheet.__getitem__sDK,gii>>>r"N)r2r3r4r,rrr0r5r"rSpreadSheetrs=DDF
+
+
+
?
?
?
?
?r"r5a1za1*6a2za2*7a3ceZdZdZdZdS)(BuiltinTest.test_general_eval.<locals>.Cc t|rr)ritems  rr0z4BuiltinTest.test_general_eval.<locals>.C.__getitem__stnn$r"cdSrfr5r&s rrz-BuiltinTest.test_general_eval.<locals>.C.keysrr"Nrr5r"rCrs2
%
%
%




r"r)
rror r	NameErrorrqrrcollectionsUserDict)
rrmgrrr`rssrs
          rtest_general_evalzBuiltinTest.test_general_eval}s#	#	#	#	#	#	#	#	#
ACCIIc1a"---)T31555gq!,,d5kk:::k1a00!444j!Q//333)T3222								
ACC)T31555	#	#	#	#	#	#	#	#
ACCc1a"---)T31555gq!,,d5kk:::k1a00!444j!Q//333	

(!Q///
(![-A-C-CDDD	?	?	?	?	?	?	?	?[]]444D3'''								
	
)T7GIIqqssCCCCCr"ci}td|d|vr|d=||dditd|d|vr|d=||ddii}i}t5tjddd	
td||dddn#1swxYwYd|vr|d=d|vr|d=|||fddid
difdS)Nzz = 1rrtr*zz = 1+1rignorezglobal statementr")modulezglobal a; a = 1; b = 2rr)rrorwarningsfilterwarnings)rrls   r	test_execzBuiltinTest.test_execsvWaQ.!S!H%%%YQ.!S!H%%%


	1	1#H.@%
'
'
'
')1a000	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1Q.!Q.!!Q3(S!H!566666s3)B((B,/B,ctddd}|tdt|dii|t
t|ddidS)Nzprint('Hello World!')rPrzname 'print' is not definedr{)r)rdrrrr)rr7s  rtest_exec_globalszBuiltinTest.test_exec_globalssr.F;;y*G#TNB+?	A	A	A	
)~s&;	=	=	=	=	=r"c	GddtGfddt}tttjr|tj}n|t}tddd}|t|d|itd	d
d}|
tdt|diit|d|i|
tdt|d|i|i}tddd}|t||dS)
NceZdZdS)>BuiltinTest.test_exec_globals_frozen.<locals>.frozendict_errorNrr5r"rfrozendict_errorrDr"rceZdZfdZdS)8BuiltinTest.test_exec_globals_frozen.<locals>.frozendictcd)Nzfrozendict is readonlyr5)rrvaluers   rrzDBuiltinTest.test_exec_globals_frozen.<locals>.frozendict.__setitem__s&&'?@@@r"N)r2r3r4r)rsr
frozendictrs5
A
A
A
A
A
A
Ar"rz1__builtins__['superglobal']=2; print(superglobal)testrrz
class A: passrPz__build_class__ not foundzx=1)	Exceptionrrrrrrmr)rrrdr)rrfrozen_builtinsr7	namespacers     @rtest_exec_globals_frozenz$BuiltinTest.test_exec_globals_frozens					y				A	A	A	A	A	A	A	A	A	A
lE$455	7(j)>??OO(j66OJFTZ[[*~&G	I	I	IF33y*E#TNB+?	A	A	A	
TNO4555y*E#TNJJLL+I	K	K	KJrNN	uff--*i	1	1	1	1	1r"c
@GddtGfddt}tddd}|t||dditd	dd}|t|d
|d	diidS)NceZdZdS)@BuiltinTest.test_exec_globals_error_on_get.<locals>.setonlyerrorNrr5r"rsetonlyerrorrrr"rceZdZfdZdS)?BuiltinTest.test_exec_globals_error_on_get.<locals>.setonlydictcrr5)rrrs  rr0zKBuiltinTest.test_exec_globals_error_on_get.<locals>.setonlydict.__getitem__	s	""r"Nr)rsrsetonlydictr
s.
#
#
#
#
#
#
#r"r
globalnamerrr*superglobalr)rrr)rr)rrr7rs   @rtest_exec_globals_error_on_getz*BuiltinTest.test_exec_globals_error_on_gets					9				#	#	#	#	#	#	#$	#	#	#
|VV44,kk<2C&D&D	F	F	F}ff55,d);;
q7I+J+JK	M	M	M	M	Mr"c	Gddt}tddd}t|d|ddii|tdt|d|idS)	NceZdZdS)?BuiltinTest.test_exec_globals_dict_subclass.<locals>.customdictNrr5r"r
customdictrrr"rrrrrr*z!name 'superglobal' is not defined)rr)rrdr)rrr7s   rtest_exec_globals_dict_subclassz+BuiltinTest.test_exec_globals_dict_subclasss								}ff55TNJJ
q/A$B$BCDDDy*M#TNJJLL+I	K	K	K	K	Kr"ctj}dt_	tdn#t$rYnwxYw|t_dS#|t_wxYw)Nr)rzstdoutrr)r
savestdouts  rtest_exec_redirectedz BuiltinTest.test_exec_redirected!sbZ

	$IIII			D	$CJJJCJ####s!*A
7A7AAcd}dfd}|\}}dt|j|j|j|ddtdtd|jdf}t|j|j||d	|tt|j|j||tt|j|jd|tt|j|j|jt|}|tt|j|j|t|d<t|}|tt|j|j|dS)
NcdS)Nr5r5r"rfunction_without_closuresz@BuiltinTest.test_exec_closure.<locals>.function_without_closures-s5r"rc<dddfd}fd}||fS)NrrrczdSrr5)rrrsrthree_freevarszUBuiltinTest.test_exec_closure.<locals>.make_closure_functions.<locals>.three_freevars5s1r"czzdSrr5)rrrrsr
four_freevarszTBuiltinTest.test_exec_closure.<locals>.make_closure_functions.<locals>.four_freevars:s
1Qr"r5)rr!rrrrs  @@@rmake_closure_functionsz=BuiltinTest.test_exec_closure.<locals>.make_closure_functions1smAAA















"=00r")closurer#Hri	)r__code____globals____closure__ror
rrrqrr/)rrr"rr!
my_closurers      @rtest_exec_closurezBuiltinTest.test_exec_closure,s!				1	1	1	1	1 )?(>(@(@%
^
$&".	0	0	0	0	
###rllHRLL.2LQ2OP
^
$&	 	 	 	 	
&&&	
)%.%1			 	 	 	
)#&						
)#&!-			/	/	/*%%
)#&			 	 	 
1
:&&
)#&			 	 	 	 	 r"c0|ttddtd|ttdddgdgdddd	gdddgdg|ttd
gdgd|ttdtd
gd|ttdtd
gdd}t|td|t
tGddt}|tttd|d}|t
tt|td|ttddddg|ttddddg|t
ttdddS)Nc"d|cxkodkncS)Nrrtr5)rs rrz)BuiltinTest.test_filter.<locals>.<lambda>{ssa3r"zHello Worldelloorldr*hellorrPrDrc|dkSrr5rs rrz)BuiltinTest.test_filter.<locals>.<lambda>}s
q1ur")r*rDrr)r*rDrrF)	r*rrD$1@Qc|dzS)Nrr5r0s rrz)BuiltinTest.test_filter.<locals>.<lambda>s
qsr")r*rDr3r5r7cdSrfr5)rs ridentityz)BuiltinTest.test_filter.<locals>.identitys1r"rceZdZdZdS)'BuiltinTest.test_filter.<locals>.BadSeqc |dkrdSt)Nrrrrindexs  rr0z3BuiltinTest.test_filter.<locals>.BadSeq.__getitem__s772  r"Nrr5r"rBadSeqr<s#
!
!
!
!
!r"r@c|Srr5r0s rrz)BuiltinTest.test_filter.<locals>.<lambda>sQr"cdSrr5r5r"rbadfuncz(BuiltinTest.test_filter.<locals>.badfuncDr"r*rrc|dkS)Nrr5r0s rrz)BuiltinTest.test_filter.<locals>.<lambda>s
q!tr"r*rrrrr)	rorqfilterrrrrrrN)rr:r@rCs    rtest_filterzBuiltinTest.test_filterzspf%>%>
NNOOQUV`QaQabbbfTAwQCT1a+PQQRRUVX_bcadfgThiiif__6F6F6FGGHH)))TTTfT72;;7788:[:[:[\\\f]]GBKK@@AACUCUCUVVV			x$$$)V,,,	!	!	!	!	!V	!	!	!
	
*dF;;,I,IJJJ			)T6'588+D+DEEE	
fT62233aV<<<f^^\BBCCaVLLL)T6"f+=+=>>>>>r"cttjdzD]P}ttd}ttd}||t
||QdS)Nr*
abcdeabcde)rNrlHIGHEST_PROTOCOLrHrdrxrq)rrvf1f2s    rtest_filter_picklezBuiltinTest.test_filter_picklesj62Q677	8	8E\22B\22B""2tBxx7777	8	8r"cpucd}ttt|}t|D]}tt|}~tjdS)Ni@B)rHboolrNgccollect)r	max_itersr._s    rtest_filter_dealloczBuiltinTest.test_filter_deallocsX	4y))**y!!	 	 AtQAA


r"c`|ttdtju|t
t|t
ttd}|t
|ttd|t
|ttdd|tttttj	|ttdddS)Nrrbr*rau픞)
rgetattrrzrrrrdAttributeErrorrgrres  rtest_getattrzBuiltinTest.test_getattrsX..#*<===)W---)Wc222;y#wQ???y#wQGGG.'3CN8K8KLLL.'1nEEEEEr"c	|ttd|tt|tttd}|t|ttd|dttttjGdd}|tt|dGdd	}|tt|ddS)
Nrrbr*FceZdZdZdS)#BuiltinTest.test_hasattr.<locals>.Actr)
SystemExitrwhats  r__getattr__z/BuiltinTest.test_hasattr.<locals>.A.__getattr__rr"Nr2r3r4rcr5r"rrr^rr"rrceZdZdZdS)#BuiltinTest.test_hasattr.<locals>.Bctrrras  rrcz/BuiltinTest.test_hasattr.<locals>.B.__getattr__rr"Nrdr5r"rBrfrr"rh)rrrzrrrdrorgrr`r)rrBrrhs    rtest_hasattrzBuiltinTest.test_hasattrs1X..///)W---)Wc222;y#wQ???S-@-@ A ABBB	!	!	!	!	!	!	!	!	
*gqqssC888	!	!	!	!	!	!	!	!	
*gqqssC88888r"cTtd|tdtd|tdtdtd|tdtdtdd}t||ttg|ttiGdd}|t	t|t
Gd	d
t
}|t|dtddS)Nr*rrasspamrr*rrcdSrr5r5r"rrz BuiltinTest.test_hash.<locals>.frr"ceZdZdZdS) BuiltinTest.test_hash.<locals>.XcddzS)NrrJr5r&s r__hash__z)BuiltinTest.test_hash.<locals>.X.__hash__s#v
r"Nr2r3r4rpr5r"rrrns#




r"rceZdZdZdS) BuiltinTest.test_hash.<locals>.Zc|Srr5r&s rrpz)BuiltinTest.test_hash.<locals>.Z.__hash__r"Nrqr5r"rZrs#




r"rvr)hashrorrrpr)rrrrvs    r	test_hashzBuiltinTest.test_hashsyT


a$q''***a$s)),,,VftG}}555Y

Q)T2...)T2...									
d1133ii#...									
aaeed2hh/////r"c|tdd|tdd|ttidS)Nr20x10iz-0x10)rohexrrr&s rtest_hexzBuiltinTest.test_hexsXR&)))S7+++)S"-----r"ctdtdtdtdtdtgdtdddddS)Nr*rrarkrr)raeggsham)idr&s rtest_idzBuiltinTest.test_idsf
4
1
3
6



9



999



Aq++,,,,,r"c|tt|ttdddddgdg}|D]x}t|}|t	|d|t	|d|t
t|ydS)Nr)rB2rBr12)rriterrorrrs)rlistsrr.s    r	test_iterzBuiltinTest.test_iters)T***)T2r222c3Z.	6	6AQAT!WWc***T!WWc***mT15555		6	6r"czGdd}Gdd|}Gdd}|}|}|}|t|||t|||t|||t|||td||tt|d|ttdS)NceZdZdS)&BuiltinTest.test_isinstance.<locals>.CNrr5r"rrrrr"rceZdZdS)&BuiltinTest.test_isinstance.<locals>.DNrr5r"rrrrr"rceZdZdS)&BuiltinTest.test_isinstance.<locals>.ENrr5r"rErrr"rr)rrrrrrrrrr`rs       rtest_isinstancezBuiltinTest.test_isinstancesh																								
ACC
ACC
ACC
1a(()))
1a(()))Jq!,,,---Jq!,,,---Jua000111)ZE:::)Z00000r"c.Gdd}Gdd|}Gdd}|}|}|}|t|||t|||t|||ttd||tt|d|ttdS)NceZdZdS)&BuiltinTest.test_issubclass.<locals>.CNrr5r"rrrrr"rceZdZdS)&BuiltinTest.test_issubclass.<locals>.DNrr5r"rrrrr"rceZdZdS)&BuiltinTest.test_issubclass.<locals>.ENrr5r"rrrrr"rr)r
issubclassrrrs       rtest_issubclasszBuiltinTest.test_issubclasssD																								
ACC
ACC
ACC
1a(()))
1a(()))Jq!,,,---)Z:::)ZE:::)Z00000r"c|tdd|tdd|tdd|tgdd|tid|tddd	dGd
d}|tt|Gdd
}|tt|Gdd}|tt|Gdd}|tt|Gdd}|t
t|Gdd}|tt|Gddt}|tt|dS)N123rr5rrGrr*rrceZdZdZdS)$BuiltinTest.test_len.<locals>.BadSeqctrrr&s rr'z,BuiltinTest.test_len.<locals>.BadSeq.__len__rr"Nr2r3r4r'r5r"rr@rrr"r@ceZdZdZdS)(BuiltinTest.test_len.<locals>.InvalidLencdSrr5r&s rr'z0BuiltinTest.test_len.<locals>.InvalidLen.__len__ str"Nrr5r"r
InvalidLenrrwr"rceZdZdZdS)&BuiltinTest.test_len.<locals>.FloatLencdS)Ng@r5r&s rr'z.BuiltinTest.test_len.<locals>.FloatLen.__len__$sr"Nrr5r"rFloatLenr##




r"rceZdZdZdS))BuiltinTest.test_len.<locals>.NegativeLencdS)Nir5r&s rr'z1BuiltinTest.test_len.<locals>.NegativeLen.__len__(rr"Nrr5r"rNegativeLenr'rr"rceZdZdZdS)%BuiltinTest.test_len.<locals>.HugeLenc tjdzSrfrzrr&s rr'z-BuiltinTest.test_len.<locals>.HugeLen.__len__,s{Q&r"Nrr5r"rHugeLenr+rr"rceZdZdZdS)-BuiltinTest.test_len.<locals>.HugeNegativeLenc"tjdz
S)NrFrr&s rr'z5BuiltinTest.test_len.<locals>.HugeNegativeLen.__len__0s|B&r"Nrr5r"rHugeNegativeLenr/rr"rceZdZdS))BuiltinTest.test_len.<locals>.NoLenMethodNrr5r"rNoLenMethodr3rr"r)ror%rrrrr)rr@rrrrrrs        rtest_lenzBuiltinTest.test_lensUQ'''R!$$$\**A...\\\**A...R!$$$!!__--q111	!	!	!	!	!	!	!	!	
*c6688444									
)S**,,777									
)S((**555									
*c;;==999	'	'	'	'	'	'	'	'	
-ggii888	'	'	'	'	'	'	'	'	
*c??+<+<==='''''&''')S++--88888r"c|ttdtddgd	ddlmn#t$rdYnwxYw|ttfdd	dgd
dggdd
gddgg|ttdgdgdgdd}|tt|gdgd|tt|gdgdgd|tt|gdgdgdgd|ttttdgdd}|tt|tdtdddg|	tt|	ttdd Gd!d"}|	tttd#|d$}|	ttt|td%dS)&Nc||zSrr5r0s rrz&BuiltinTest.test_map.<locals>.<lambda>8s
qsr"r*r)r*rrDr)sqrtc"t|dS)N?)powr0s rrz"BuiltinTest.test_map.<locals>.sqrt>s1c{{"r"c>tt|Sr)rqmap)rrs rrz&BuiltinTest.test_map.<locals>.<lambda>AstCaLL11r"r2r7rD@@g"@rc||zSrr5rs  rrz&BuiltinTest.test_map.<locals>.<lambda>Es
!A#r")r*rr)rDr*r)rFrrcd}|D]}||z}|Srr5)vaccur.s   rplusz"BuiltinTest.test_map.<locals>.plusIs!D''taxKr")r*rrs)rrDr)rrrD)r*r*r)r
rDrF)
rr*rrDr2r3r4r5r6r7c2||S||St||Sr)rrs  rMaxz!BuiltinTest.test_map.<locals>.Max]s$yyq!99r"rrc|Srr5r0s rrz&BuiltinTest.test_map.<locals>.<lambda>hsAr"rceZdZdZdS)$BuiltinTest.test_map.<locals>.BadSeqc3Ktrrr&s rr]z-BuiltinTest.test_map.<locals>.BadSeq.__iter__js  r"Nr^r5r"rr@ris#




r"r@c|Srr5r0s rrz&BuiltinTest.test_map.<locals>.<lambda>ms!r"ctrrUr0s rrCz%BuiltinTest.test_map.<locals>.badfuncnsr"r)
rorqrrNmathrrrrrrrrV)rrrr@rCrs     @rtest_mapzBuiltinTest.test_map6sP]]E!AJJ//00II	
	
	
	#!!!!!!!	#	#	#
#
#
#
#
#	#	
1111RGb!W3EFFGG3Z#s$	
	
	
	
%%www8899JJ	
	
	

				
T999%%&&II	
	
	
	
T999iii0011OO	
	
	
	
T999iii;;<<!!!	
	
	
	
S'"++&&''000	
	
	
				
S'!**gajj1122
F	
	
	
	
)S))))S++r:::									
*dCVVXX,F,FGGG			,c'588.D.DEEEEEsA
AActtjdzD]P}ttd}ttd}||t
||QdS)Nr*zIs this the real life?)rNrlrLrrhrxrq)rrvm1m2s    rtest_map_picklezBuiltinTest.test_map_picklersl62Q677	8	8EX788BX788B""2tBxx7777	8	8r"c|tdd|tdddd|tdd|tgdd|tdddd|tdddd|td	ddd|td
5tdddn#1swxYwY|ttd|t
tdGd
d}|t
t|dD]D}	t
|t||5#t$rYAwxYw|tdtd|tdtd|tddtd|tddd|tddd|tddd|tddtd|tddtd|tddddtdD}td|D}|j}|t||tt||ddS)N1231233r*rrr*rrr*rrrrrz'max expected at least 1 argument, got 0rr5ceZdZdZdS)$BuiltinTest.test_max.<locals>.BadSeqctrrr>s  rr0z0BuiltinTest.test_max.<locals>.BadSeq.__getitem__rr"Nrr5r"rr@rrr"r@)zmax(key=int)zmax(default=None)zmax(1, 2, default=None)zmax(default=None, key=int)zmax(1, key=int)zmax(1, 2, keystone=int)zmax(1, 2, key=int, abc=int)zmax(1, 2, key=1)r*rrEdefaultrrc6g|]}tjdSrrandom	randrangerr.s  r
<listcomp>z(BuiltinTest.test_max.<locals>.<listcomp>#:::! %%:::r"rJc3BK|]}|tjdfVdSrNrrelems  rrz'BuiltinTest.test_max.<locals>.<genexpr>2BBTT6+B//0BBBBBBr"r
)rorrdrrrrrfailrrNrr0rreversedrr@stmtdatarrs      rtest_maxzBuiltinTest.test_maxxsX,,,Q1q)))/00!444///00!444Q3---QQ+++S!Q+++

#
#5

		
EEE																	
)S"---*c2...	!	!	!	!	!	!	!	!	
*c6688444		 	 D
 T799%%%		$




	
Ts+++Q///U,,,a000Qs+++Q///R...555T4000!444UD1111555R444a888VQC888!<<<V...222::uSzz:::BBTBBBBBTq)))A666r:	<	<	<	<	<$D66D:=D:>G00
G=<G=c|tdd|tdddd|tdd|tgdd|tdddd|tdddd|td	ddd	|td
5tdddn#1swxYwY|ttd|t
tdGd
d}|t
t|dD]D}	t
|t||5#t$rYAwxYw|tdtd|tdtd|tddtd|tddd|tddd|tddd|tddtd|tddtd|tddddtdD}td|D}|j}|t||t||ddS)NrrBr*rrrrrrz'min expected at least 1 argument, got 0rr5ceZdZdZdS)$BuiltinTest.test_min.<locals>.BadSeqctrrr>s  rr0z0BuiltinTest.test_min.<locals>.BadSeq.__getitem__rr"Nrr5r"rr@rrr"r@)zmin(key=int)zmin(default=None)zmin(1, 2, default=None)zmin(default=None, key=int)zmin(1, key=int)zmin(1, 2, keystone=int)zmin(1, 2, key=int, abc=int)zmin(1, 2, key=1)rrrErrc6g|]}tjdSrrrs  rrz(BuiltinTest.test_min.<locals>.<listcomp>rr"rJc3BK|]}|tjdfVdSrrrs  rrz'BuiltinTest.test_min.<locals>.<genexpr>rr"r)rominrdrrrrrrrrNrr0rrs      rtest_minzBuiltinTest.test_minsX,,,Q1q)))/00!444///00!444Q3+++QQ+++S!Q---

#
#5

		
EEE																	
)S"---*c2...	!	!	!	!	!	!	!	!	
*c6688444		 	 D
 T799%%%		$




	
Ts+++Q///U,,,a000Qs+++Q///R...555T4000!444UD1111555R444a888VQC888!<<<V...222::uSzz:::BBTBBBBBTq)))!,,,Q/	1	1	1	1	1rc^ttd}|t|d|t|d|t
t||t
t||t|ddGddt}t|}|t|dd|t
t|d}|}|t|d|t
t||t|dddS)Nrrr*rceZdZdZdZdS)#BuiltinTest.test_next.<locals>.Iterc|Srr5r&s rr]z,BuiltinTest.test_next.<locals>.Iter.__iter__rur"ctr)rsr&s r__next__z,BuiltinTest.test_next.<locals>.Iter.__next__s##r"N)r2r3r4r]rr5r"rIterrs2



$
$
$
$
$r"r	c3KdVdSrfr5r5r"rgenz"BuiltinTest.test_next.<locals>.gensGGGFr")rrNrorrrrsr)rrtr	rs    r	test_nextzBuiltinTest.test_nexts
%((^^b1%%%b1%%%-r222-r222b"r***	$	$	$	$	$6	$	$	$$$&&\\b"r***-r222			SUUb1%%%-r222b"r*****r"c|tdd|tdd|ttddS)NrJ0o144iz-0o144r5)rooctrrr&s rtest_octzBuiltinTest.test_oct	sXS7+++TH---)S"-----r"cttdd}|tt|5|d|d|d|d|d|d	ddddS#1swxYwYdS)
Nwutf-8encoding1+1
z+The quick brown fox jumps over the lazy dogz.
z
Dear John
,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX,YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY)openr
addCleanuprr@rfps  rwrite_testfilezBuiltinTest.write_testfiles
&#
0
0
0'''
	 	 HHWHHBCCCHHUOOOHH]###HHYHHY
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 sA?CC

C
c|ttd}|5||dd||d||dd||dd||d	d
||dddddn#1swxYwY|ttd
|ttddS)Nrrrrz-The quick brown fox jumps over the lazy dog.
DearrJz John
rrrzabsab)rrrroreadlinereadrrrs  r	test_openzBuiltinTest.test_opensz
&7
+
+
+
	7	7R[[^^W555R[[]],\]]]R[[^^V444R[[--y999RWWS\\9555RWWT]]I666
	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	
*dH555*dI66666sC6D//D36D3zutf-8 mode is enabledcttj}	dD]}|tjvr
tj|=|t	j}t
j5t
jdtttd}dddn#1swxYwY|5||j
|dddn#1swxYwYtjtj|dS#tjtj|wxYw)N)LC_ALLLANGLC_CTYPErr)rosenvironrlocalegetencodingrcatch_warningssimplefilterEncodingWarningrrrorclearupdate)rold_environrcurrent_locale_encodingrs     rtest_open_default_encodingz&BuiltinTest.test_open_default_encoding)s2:&&	+6
(
("*$$
3!!!&,&8&:&:#(**
'
'%h@@@&#&&
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
G
G  .EFFF
G
G
G
G
G
G
G
G
G
G
G
G
G
G
G
JJk*****
JJk****sTAD050B1%D01B55D08B59D0>C&D0&C**D0-C*.D00?E/cttd}|5|tj|ddddS#1swxYwYdS)Nrr)r__file__rr(get_inheritablefileno)rfileobjs  rtest_open_non_inheritablez%BuiltinTest.test_open_non_inheritable?sx'222
	C	CR/0@0@AABBB	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C	Cs:A  A$'A$cb|tdd|tdd|tdd|tdd|td	d
|tdd|tdd|td
d|tdd|tdd
|tttjtj|ttd|ttdd|tdd|tdd|tdd|tdd|tdd|tdd|tdd|td d!|td"ddS)#NrQrrrrr€rr Arrrrrrrrrrrrrrrrrr
r	r)rorargrzrrrr&s rtest_ordzBuiltinTest.test_ordEsS2&&&S2&&&S2&&&Vc***Vc***TB'''TB'''TB'''Ws+++Ws+++S00113>BBB)S"---S]]++X666\**J777\**J777\**J777\**J777\**J777\**J777\**J777\**J777\**J77777r"c
|tddd|tddd|tddd|tddd|tddd|tddd|tddd|tddd	|td
dd|td
dd
|td
dd|td
dd
|tddd|tddd|tddd|tddd|tddd|tddd|tddd|tddd|tddd|tddd|tddd|tddddD]}dD]}dD]}t|ts*t|tst|tr$|tt|||e|t|||d|tddd|tddd|tdd
dd|ttddd|tt|tdd d|tdd!d"|td#dd$%d&ttd'}||d# d(ttd# }||dd(ttd)}||dd*d||d*d+ddS),Nrr*rrFirrr@rrrrrrg@g0AgAgr )rr)rF$@)r g@@g8@r
ry?gUUUUUU?y?LXz?)exp)baserGr2r)rHrGmod)rHr)rJr)rGrH)	rorrrfloatrrrr)rrrrttwopowfifth_powermod10s       rtest_powzBuiltinTest.test_pow`sKQq1%%%Qq1%%%Qq1%%%Qq1%%%Qq1%%%QrD)))QrI...QrN333RA&&&RB'''RA&&&RB'''s2ayy"---s2ayy"---s2ayy"---s2ayy"---s2ayy"---s2bzz5111s2bzz;777s2bzz+<===s3qzz2...s3qzz3///s3qzz2...s3qzz3///	C	CA
C
C%CCA!!U++C!!U++C!!U++C)))S!QBBBB..s1a||TBBBB
C
C	
s2s||R000s2s||-FGGG	
RQ+++*c1a333)S)))	
QA***!+++R000!333R8881%%%A+++cq)))Q,,,$$$q!a(((11---q11111r"c:|ttd}tj}tj}	|t_t
t_|td|td|tdd|t_tj	|
ttt
t_tj
dt_|
ttddtj
d	t_|td	tj
t_|
ttt`|
t td
t`|
t td
|t_|t_|	dS#|t_|t_|	wxYw)Nrrrz,The quick brown fox jumps over the lazy dog.ztesting
z	Dear JohnzNULLrz    'whitespace'prompt)rrrrzstdinrr=roinputcloserrioStringIOrEOFErrorrV)rr	savestdinrs    r
test_inputzBuiltinTest.test_inputs
&7
+
+
+I	Z
	CI"CJUWWe,,,UWW&TUUUU;//===$CJIOOj%000"CJH--CIiB777$677CIUWW&8999

CIh...
lE8<<<	lE8<<<!CI#CJHHJJJJJ"CI#CJHHJJJJs
G:I,,.Jc,|tdd|tdd|tdd|tgd|tidg}|||t|d	i}||d<|t|d
dS)NrPrrrAr5rrrrr)rorr,)rrs  r	test_reprzBuiltinTest.test_reprsb6***a#&&&b4(((b4(((b4(((	a),,,!a,/////r"c
|tdd|ttdt|tdd|tdd|tdd|tdd|tdd|tdd|tdd|td	d	|td
d|tdd|tdd|td
d|tdd|tdd|tdd|tdd|tdd|tdd|tdd|tdd|tdd|tddd|ttddt|ttddt|ttddt|tdd|tdd|tdd|td d|tdd|td!d!|td"d"|ttdt|ttd"dt|ttd"dt|ttd"dt|tdd#d|ttGd$d%}Gd&d'}|t|d(|ttdd)d*|tt||}d+|_|tt||tt|ddS),NrrrFgeAg@xDrg$geg@xg?g?g333333$@geAgg333333$geg?g#@g33dAgg#g33drEr
rr*g@rg@gigrlrD)numberndigitsceZdZdZdS))BuiltinTest.test_round.<locals>.TestRoundcdS)Nr5r&s r	__round__z3BuiltinTest.test_round.<locals>.TestRound.__round__
rr"N)r2r3r4rdr5r"r	TestRoundra	rr"receZdZdS)+BuiltinTest.test_round.<locals>.TestNoRoundNrr5r"rTestNoRoundrg
rr"rhrcrrc|Srr5)argss rrz(BuiltinTest.test_round.<locals>.<lambda>sDr")roroundrprrLrrrd)rrerhts    r
test_roundzBuiltinTest.test_roundssS)))eCjj))3///sS)))td+++|,,l;;;td+++td+++uu---}--}===uu---sS)))sS)))td+++|,,l;;;td+++uu---}--}===sS)))sT***{++\:::td+++te,,,|,,m<<<tR%000eD"oo..666eD!nn--u555eD!nn--u555	
sQ'''sQ'''tb)))tb)))	
q1%%%q1%%%rB'''eAhh---eBmm,,c222eBll++S111eBll++S111	
dB777???)U+++																	
yy{{++R000)UAq!444)UKKMM:::KMM(()UA...)UAq11111r"Linuxalpha7y1CzItest will fail;  failure is probably due to a buggy system round functioncd|tdd|tdd|tdd|tdd|tdddS)Ng7y1Cg7y1Crpg7y1Cg7y1C)rorkr&s rtest_round_largezBuiltinTest.test_round_large$s
	
v///td+++v///v///v/////r"c	ZddtjdtjddfD]~}|t|dt||t
t|dt
t|dS)Nrg
ףp=J@z1234.56i@rJ)decimalDecimal	fractionsFractionrorkrprs  rtest_bug_27936zBuiltinTest.test_bug_27936/s/),,$VS113	C	CA
U1d^^U1XX666T%4..114a>>BBBB	C	Cr"cttdd|tjd|t
t|t
tt|t
ttdd}|t
|ttdddS)Nrar*rb)setattrrzrorarrrdres  rtest_setattrzBuiltinTest.test_setattr8sVQ1%%%)W---)Wc222)Wc6:::;y#wQGGGGGr"c
|tgd|tttddd|tt	ttddd|ttdd|tt	tdd|tdgdgdggggd	|ttdd
d|ttdd
d|ttdd
d|ttddd|tdtdDd|tdtdDdd|tdtdDdd|tgdd|tdtdDd|tdtdDd
d|tdtdDdd |td!dgd"|tdd!gd"|ttd#gd$|ttd#gd#d%|ttgd#d%|tt|ttd&|ttgd'|ttgd'd(|ttd)d*gd+td)td,g}|tt|td+|ttdgdgdgg|ttddig|ttddigdzddi|ttgd(|ttgd+|ttgtGd-d.}|tt|g}td/tdD|||gdS)0NrrrlrFir*rr*rrr i)startil(ll(c3(K|]
}|dzdkVdSrrNr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>Ps*;;AQUaZ;;;;;;r"rc3(K|]
}|dzdkVdSrr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>Q*<<Qa!eqj<<<<<<r"ilc3(K|]
}|dzdkVdSrr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>Srr"llFc3 K|]	}|dzV
dSrNr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>Ws&66qQU666666r"g6@c3 K|]	}|dzV
dSrr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>X&77a!e777777r"g@c3 K|]	}|dzV
dSrr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>Yrr"gB@g@rg?gz0.0z-0.0rrrPrcr"bceZdZdZdS)$BuiltinTest.test_sum.<locals>.BadSeqctrrr>s  rr0z0BuiltinTest.test_sum.<locals>.BadSeq.__getitem__orr"Nrr5r"rr@rnrr"r@c3K|]}|gVdSrr5rs  rrz'BuiltinTest.test_sum.<locals>.<genexpr>ts$$$QaS$$$$$$r")rosumrqrNrrassertIsrrr	bytearrayr)rr2r@emptys    rtest_sumzBuiltinTest.test_sumCsR!$$$T%!**--..333T$uQqzz"2"23344b999WR[[))3///T'"++..//555qcA3_b11999===U2YY--t444U2YYd333T:::U2YY00(;;;U2YY00(;;;;;r;;;;;Q???<<%))<<<gFF 	"	"	"<<%))<<<gFF 	"	"	"

c"enne,,,66E"II66666===77U2YY777>>GGG77U2YY777AA7KKKc1X,,,aX,,,c4&kk**E222c4&$//00&999c"dmm,,f555)S))))S"---)S///:::)S///2>>>)S4,<<<D//9T??3)S&)C..AAA)SA3aS/:::)SAa5'222)SAa5'!)aU;;;)S"b111)S"c222)S"ikk:::	!	!	!	!	!	!	!	!	
*c6688444$$%))$$$e,,,#####r"c|tdtd|tdtddS)NrPrr5)rorprDr&s r	test_typezBuiltinTest.test_typewsLbDKK000DHHd2hh/////r"ctSr)varsr5r"rget_vars_f0zBuiltinTest.get_vars_f0}svv
r"cXtd}d}tS)Nr*r)rjrrrs  rget_vars_f2zBuiltinTest.get_vars_f2s'!!!

vv
r"c,eZdZdZeeZdS)BuiltinTest.C_get_varsc
ddiS)Nrrr5r&s rgetDictzBuiltinTest.C_get_vars.getDicts7Nr")fgetN)r2r3r4rpropertyrmr5r"r
C_get_varsrs/			8)))r"rc|tttt|tttttt||i||ddd|ttdd|ttd|t|	ddidS)Nr*rrrr)
rosetrrrzrrrrrr&s r	test_varszBuiltinTest.test_varss
TVVc#%%jj111T#YYSXX777))++R000))++11-=-=>>>)T2r222)T2...doo//003q':::::r"cg}||5|D]}||	dddn#1swxYwY|S)z=Collect `iterable` into a list, catching an expected `error`.N)rr,)riterableerroritemsrs     r
iter_errorzBuiltinTest.iter_errors


u
%
%	#	# 
#
#T""""
#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#sAAAc
d}d}gd}|tt|||gd}|tt|||d}|tt|||Gdd}|tt||||ttg|ttgg|ttdGdd}|tt|||t
t|t
Gd	d
}|tt|tdtttdGd
d}|ttt||dS)Nr~rrr)r*r)rr)rrrrrrsceZdZdZdS)BuiltinTest.test_zip.<locals>.Ic2|dks|dkrt|dzS)Nrrrr+rr.s  rr0z+BuiltinTest.test_zip.<locals>.I.__getitem__s!q55AEE#31ur"Nrr5r"rIrs#




r"rceZdZdS)BuiltinTest.test_zip.<locals>.GNrr5r"rGrrr"rceZdZdZdS)4BuiltinTest.test_zip.<locals>.SequenceWithoutALengthc |dkrt|SNrrrs  rr0z@BuiltinTest.test_zip.<locals>.SequenceWithoutALength.__getitem__66$$Hr"Nrr5r"rSequenceWithoutALengthr#




r"rrCrceZdZdZdS)$BuiltinTest.test_zip.<locals>.BadSeqc |dkrt|Srrrs  rr0z0BuiltinTest.test_zip.<locals>.BadSeq.__getitem__rr"Nrr5r"rr@rrr"r@)
rorqziprrrVr[rN	enumerater)rrrrlrrrr@s        rtest_zipzBuiltinTest.test_zips$$$c!Qii!,,,IIc!Qii!,,,c!Qii!,,,									
c!QQSSkk**A...ceeb)))c2h,,,)S$///								)S!QQSS111,Q0A0ABBB
									
++--uU||<<==588$$%%	
	
	

									
*dC&&((,C,CDDDDDr"cd}d}gd}ttjdzD])}t||}||||*dS)Nr~rrr*rNrlrLrrxrrrrlrvz1s      rtest_zip_picklezBuiltinTest.test_zip_picklesh$$$62Q677	1	1EQB""2q%0000	1	1r"cd}d}gd}ttjdzD]+}t||d}||||,dS)Nr~rrr*Tstrictrrs      rtest_zip_pickle_strictz"BuiltinTest.test_zip_pickle_strictso$$$62Q677	1	1EQ$'''B""2q%0000	1	1r"cd}d}gd}ttjdzD]}t||d}tjtj||}|||t||||t|dS)Nr~rrr*Tr)	rNrlrLrrnrmrorr)rrrrlrvrz2s       rtest_zip_pickle_strict_failz'BuiltinTest.test_zip_pickle_strict_fails$$$62Q677	A	AEQ$'''Bfl2u5566BT__R<<a@@@T__R<<a@@@@		A	Ar"c
tGfdd}|t5}t|dddn#1swxYwY||jdS)NceZdZfdZdS)6BuiltinTest.test_zip_bad_iterable.<locals>.BadIterablecrr5)r	exceptions rr]z?BuiltinTest.test_zip_bad_iterable.<locals>.BadIterable.__iter__sr"Nr^)rsrBadIterablers.
 
 
 
 
 
 
 r"r)rrrrr)rrcmrs   @rtest_zip_bad_iterablez!BuiltinTest.test_zip_bad_iterablesKK		 	 	 	 	 	 	 	 	 	 

y
)
)	R

																


blI.....sAA!$A!c
|ttdddd|tttddd|tttddd|tttdddddS)Nr~abcTr))r*r)rr)rrrGrE)ror/rrrr&s rtest_zip_strictzBuiltinTest.test_zip_strictss9eDAAABB7	9	9	9*elE$???	A	A	A*efeD999	;	;	;*effeDAAA	C	C	C	C	Cr"c
lttd}dg}ttd}|ttt|||d|t|d|t|ddS)NrrTrrr*)rrNrrrqrrorr)rrrrts    rtest_zip_strict_iteratorsz%BuiltinTest.test_zip_strict_iteratorssqNN
CqNN*dq!Qt444	7	7	7a!$$$a!$$$$$r"c
Gddt
G
fdd}|td|dd
}||d	g|td|d
ddt}||dg|td|d
d
d
}||ddg|td|ddt}||ddg|t|ddd
}||dg|t|d
ddt}||dg|t|d
d
d
}||ddg|t|dddt}	||	ddgdS)NceZdZdS)9BuiltinTest.test_zip_strict_error_handling.<locals>.ErrorNrr5r"rErrorrrr"rc&eZdZdZdZfdZdS)8BuiltinTest.test_zip_strict_error_handling.<locals>.Iterc||_dSrsizerrs  rr zABuiltinTest.test_zip_strict_error_handling.<locals>.Iter.__init__	
 			r"c|Srr5r&s rr]zABuiltinTest.test_zip_strict_error_handling.<locals>.Iter.__iter__rur"cL|xjdzc_|jdkr|jSNr*rr)rrs rrzABuiltinTest.test_zip_strict_error_handling.<locals>.Iter.__next__
s*		Q		9q==Ky r"Nr2r3r4r r]r)rsrr	rsL
!
!
!



!
!
!
!
!
!
!r"r	ABr*Trrrrrrr*rABCrhrrhrrrrhr*rrr*rrrhrrr*rh)rrrror)rr	l1l2l3l4l5l6l7l8rs          @rtest_zip_strict_error_handlingz*BuiltinTest.test_zip_strict_error_handlings					I					!		!		!		!		!		!		!		!		!		!__SttAwwt<<<e
D
DhZ(((
__SttAwwDAAA:
N
Nm_---
__SttAwwdCCCU
K
Km];<<<
__SttAwwt<<<j
I
Ih1222
__Sa$t<<<e
D
DhZ(((
__Sa#d;;;Z
H
HhZ(((
__Sa%===u
E
Eh1222
__Sa$t<<<j
I
Ih122222r"cGdd}|td|ddt}||dg|td|dd	dt}||d
g|td|dddt}||d
dg|td|d
dt}||ddg|t|dddt}||dg|t|dd	dt}||dg|t|dddt}||ddg|t|d
ddt}	||	ddgdS)Nc eZdZdZdZdZdS)FBuiltinTest.test_zip_strict_error_handling_stopiteration.<locals>.Iterc||_dSrrrs  rr zOBuiltinTest.test_zip_strict_error_handling_stopiteration.<locals>.Iter.__init__'rr"c|Srr5r&s rr]zOBuiltinTest.test_zip_strict_error_handling_stopiteration.<locals>.Iter.__iter__)rur"cT|xjdzc_|jdkrt|jSr)rrsr&s rrzOBuiltinTest.test_zip_strict_error_handling_stopiteration.<locals>.Iter.__next__+s*		Q		9q==''y r"Nrr5r"rr	r&sA
!
!
!



!
!
!
!
!r"r	rr*Trrrrrrrrrrrrrrr)rrrro)
rr	rrrrrrrrs
          r,test_zip_strict_error_handling_stopiterationz8BuiltinTest.test_zip_strict_error_handling_stopiteration$sR		!		!		!		!		!		!		!		!__SttAwwt<<<j
I
IhZ(((
__SttAwwDAAA:
N
Nm_---
__SttAwwdCCCZ
P
Pm];<<<
__SttAwwt<<<j
I
Ih1222
__Sa$t<<<j
I
IhZ(((
__Sa#d;;;Z
H
HhZ(((
__Sa%===z
J
Jh1222
__Sa$t<<<j
I
Ih122222r"ctgg}tj|tjt|dSr)rrSrTr
is_trackedrr)rrts  rtest_zip_result_gczBuiltinTest.test_zip_result_gcBsF
"YY

	

d2hh//00000r"ctdddd}fd}||fd}|d|d|d	|d
|d|d|t|dGd
d}tt|dtttdtttttd}|dttjdttjtttjdGdd}t|dt|ddt|ddGdd}Gddt}t||fD]}	|	}
t|
t|
t|
dt|
	tdtj|	jz5t|
ddddn#1swxYwYGddt}td|dddS)NrrPrcGddt}Gdd|}Gddt}Gdd|}Gd	d
|}||||fS)NceZdZdZdZdS)7BuiltinTest.test_format.<locals>.classes_new.<locals>.Ac||_dSrr0rs  rr z@BuiltinTest.test_format.<locals>.classes_new.<locals>.A.__init__W
DFFFr"c0t|j|zSrr;rrformat_specs  r
__format__zBBuiltinTest.test_format.<locals>.classes_new.<locals>.A.__format__Ytv;;44r"Nr2r3r4r rr5r"rrrV255555r"rceZdZdS)BBuiltinTest.test_format.<locals>.classes_new.<locals>.DerivedFromANrr5r"rDerivedFromAr[sr"rceZdZdS)<BuiltinTest.test_format.<locals>.classes_new.<locals>.SimpleNrr5r"rSimpler^rr"rceZdZdZdZdS)GBuiltinTest.test_format.<locals>.classes_new.<locals>.DerivedFromSimplec||_dSrr0rs  rr zPBuiltinTest.test_format.<locals>.classes_new.<locals>.DerivedFromSimple.__init__`rr"c0t|j|zSrrrs  rrzRBuiltinTest.test_format.<locals>.classes_new.<locals>.DerivedFromSimple.__format__brr"Nrr5r"rDerivedFromSimpler!_rr"r$ceZdZdS)HBuiltinTest.test_format.<locals>.classes_new.<locals>.DerivedFromSimple2Nrr5r"rDerivedFromSimple2r&drr"r')r)rrrr$r's     rclasses_newz,BuiltinTest.test_format.<locals>.classes_newUs
5
5
5
5
5F
5
5
5





q



'&&&&&&&
5
5
5
5
5F
5
5
5

>====%6===l$57IIIr"cpt|dddt|dddt|dddt|d	d
ddS)Nrspec3specr4specrr5abcrFabcdef10abcdef)roformat)rrr$r'rs    r
class_testz+BuiltinTest.test_format.<locals>.class_testgsVAAaDD&117;;;VLLOOV<<gFFFV$5$5a$8$8%@@&IIIV$6$6r$:$:HEE'
)
)
)
)
)r"ct|dt|t|t|dSNrP)ror0r;)rrs rempty_format_specz2BuiltinTest.test_format.<locals>.empty_format_specpsS
VE2..E

;;;VE]]CJJ77777r"l.@rg]]^Ug]]^g;q7r*g;q7rceZdZdZdS)0BuiltinTest.test_format.<locals>.BadFormatResultcdS)Nrr5rs  rrz;BuiltinTest.test_format.<locals>.BadFormatResult.__format__rr"Nr2r3r4rr5r"rBadFormatResultr6rr"r9rz<object object atceZdZdZdS)"BuiltinTest.test_format.<locals>.Ac"td|Sr3)r0)rfmt_strs  rrz-BuiltinTest.test_format.<locals>.A.__format__sb'***r"Nr8r5r"rrr;s#
+
+
+
+
+r"rrceZdZdS)"BuiltinTest.test_format.<locals>.BNrr5r"rrhr?rr"rhceZdZdS)"BuiltinTest.test_format.<locals>.CNrr5r"rrrArr"rz\b%s\bceZdZdS)/BuiltinTest.test_format.<locals>.DerivedFromStrNrr5r"rDerivedFromStrrCrr"rDrrEz
         0)
ror0rrrrr
startswithr;rdreescaper2)rr(r1r4r9rrrhrclsobjrDs`           rtest_formatzBuiltinTest.test_formatNs_	
2,,,	J	J	J$	)	)	)	)	)	
KKMM""	8	8	8	8	8	&!!!#*%%%+&&&+&&&,'''&!!!$									
)V__->->CCC	
)VVXXq999)VVXXvxx@@@
HH##%899:::	
)VXX%8!<<<)VXX%8&((CCC)VXX%8$???
	+	+	+	+	+	+	+	+	
b)))R"---S))2...																Aq>	!	!C#%%CVC[[#c((333VC__c#hh777''	(1BIcl4K4K(KMM
!
!sC   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!	(''''S'''>>$#7#788,GGGGGs4NN	N	c|tdd|tdd|tdd|tddzd	|tddzdz
d
|tddzd|tddzdz
ddS)
Nr0b0r*0b1r
z-0b1rrD0b100000000000000000000000000000000000000000000000000000000000000000C0b11111111111111111111111111111111111111111111111111111111111111111zE-0b100000000000000000000000000000000000000000000000000000000000000000zD-0b11111111111111111111111111111111111111111111111111111111111111111)robinr&s rtest_binzBuiltinTest.test_binsQ'''Q'''R&)))QU%5666QU1W777q"uX(9:::q"uQwZ*:;;;;;r"ctd}|t|jdd|t|jdddS)Nsabc1r*s1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111)rrr	translaterrs  rtest_bytearray_translatez$BuiltinTest.test_bytearray_translatesMf*ak4;;;)Q[(A>>>>>r"ct}ttd}|t|j|dS)Nr)rrrrrextend)rarraybad_iters   rtest_bytearray_extend_errorz'BuiltinTest.test_bytearray_extend_errors8sC==*elH=====r"ctdfd}|tj|dS)N,c3DKdVdVdSNr>B)r/)rXsriteratorzKBuiltinTest.test_bytearray_join_with_misbehaving_iterator.<locals>.iterators*KKMMMJJJJJJJJr")rrBufferErrorjoin)rr`rXs  @r-test_bytearray_join_with_misbehaving_iteratorz9BuiltinTest.test_bytearray_join_with_misbehaving_iteratorsO$						
+uz88::>>>>>r"ctd}d}|td||dS)Nr\c3KdVdVdSr^r5r5r"rr`zFBuiltinTest.test_bytearray_join_with_custom_iterator.<locals>.iteratorsJJJJJJJJr"sA,B)rrorb)rrXr`s   r(test_bytearray_join_with_custom_iteratorz4BuiltinTest.test_bytearray_join_with_custom_iteratorsT$				
6**EJJxxzz,B,BCCCCCr"cdttfD]j}t|}||||t
|dd|t
|ddkdS)Nr*rr)EllipsisNotImplementedrprrr)rconsttps   rtest_construct_singletonsz%BuiltinTest.test_construct_singletonss8^3	7	7EeBMM""$$&&&iQ222iqA6666		7	7r"c|ttt|t5|tdddn#1swxYwY|t5|tddddS#1swxYwYdSr)rDeprecationWarningrRrirrr&s rtest_warning_notimplementedz'BuiltinTest.test_warning_notimplementeds)	
+T>BBB


0
1
1	,	,OON+++	,	,	,	,	,	,	,	,	,	,	,	,	,	,	,


0
1
1	1	1/000	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1s$A((A,/A,
B66B:=B:N)ir2r3r4rxrrrrrrrrrr:rJunittestskipIfr
is_emscriptenis_wasirXr[r_rfrrrrrrrrrrr*rIrOrequires_resourcerWr[riryr}rrrrrrrrrrrrr#rzr>	utf8_moder3requires_subprocessr9rArPrZr\rmplatformsystemrEmachinelinux_alpharksystem_round_bugrrrxr{rrstaticmethodrrrrrrrrrrrrrrrcpython_onlyrrJrQrUrZrcrfrlror5r"rrjrjs,,,"III$....
8
8
8
8
8
8!O!O!OF,,,
 & & &DCCC,666.6.6.6`DDD*X_0!8282	82t#2#2#2LEEE @@@K8K8K8Z---$<<<.CDCDCDJ7770===111@MMM&	K	K	K	$	$	$K K K \???2888Wu%%&%	F	F	F999&000*...
---666111$111" 9 9 9D:F:F:Fx8889<9<9<v919191v+++6...

 
 
 
7
7
7X_SY(*ABB++CB+*!W ""CC#"C
8886<2<2<2|!!!J000H2H2H2b#8?$$//88:#8#%%0099uV}}.X_[5%534400440CCCHHH2$2$2$h000\\*****V***
;;;*E*E*EX111111AAA
/
/
/CCC%%%333B333<
	1	1	1cHcHcHJ<<<???
>>>
???DDD77711111r"rjc^eZdZdZdZdZdZdZdZe	j
ejj
ddZe	j
ejj
dd	Ze	j
ejj
dd
ZdZe	j
ejj
ddZd
ZdS)TestBreakpointc@t|_||jj|jt|_|jd=|jttdtj	dS)NPYTHONBREAKPOINTbreakpointhook)
r	resourcesrrU
enter_contextrenvr
rz__breakpointhook__r&s rsetUpzTestBreakpoint.setUps#,--->//0C0E0EFFH'($$c+S-CDD	F	F	F	F	Fr"ctd5}tdddn#1swxYwY|dSN
pdb.set_trace)r
breakpointassert_called_oncermocks  rtest_breakpointzTestBreakpoint.test_breakpoints
?
#
#	tLLL															!!!!!s+//c~t}|t_t|dSrrrzrrassert_called_once_withrmy_breakpointhooks  r'test_breakpoint_with_breakpointhook_setz6TestBreakpoint.test_breakpoint_with_breakpointhook_sets5%KK.1133333r"cdt}|t_t|tjt_t
d5}t|dddn#1swxYwY|dSr)rrzrrrrr)rrrs   r)test_breakpoint_with_breakpointhook_resetz8TestBreakpoint.test_breakpoint_with_breakpointhook_resets%KK.11333 3
?
#
#	+tLLL((***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	1133333s"#BBBct}|t_tddddd|ddddddS)Nr*rrrrfourfiverrs  r&test_breakpoint_with_args_and_keywordsz5TestBreakpoint.test_breakpoint_with_args_and_keywordssR%KK.1a++++11!Q1JJJJJr"c	pd}|t_|ttddddddS)NcdSrr5r5r"rrzMTestBreakpoint.test_breakpoint_with_passthru_error.<locals>.my_breakpointhookrDr"r*rrrrr)rzrrrrrs  r#test_breakpoint_with_passthru_errorz2TestBreakpoint.test_breakpoint_with_passthru_errorsB			.)ZAqqqIIIIIr"z-E was givencd|jd<td5}td|dddddS#1swxYwYdS)Nrrzbuiltins.int7rrrrrs  rtest_envar_good_path_builtinz+TestBreakpoint.test_envar_good_path_builtins',#$
>
"
"	.dsOOO((---	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.s%AAAcd|jd<td5}t|ddddS#1swxYwYdSNzsys.exitrrrs  rtest_envar_good_path_otherz)TestBreakpoint.test_envar_good_path_other&s'1#$
:

	+$LLL((***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+#A

AAcd|jd<td5}t|ddddS#1swxYwYdS)NrArr)rrrassert_not_calledrs  rtest_envar_good_path_noop_0z*TestBreakpoint.test_envar_good_path_noop_0-s'*#$
?
#
#	%tLLL""$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%rcd|jd<td5}t|ddddS#1swxYwYdS)NrPrrrrs  r!test_envar_good_path_empty_stringz0TestBreakpoint.test_envar_good_path_empty_string4s')#$
?
#
#	+tLLL((***	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+rcdD]}||5||jd<|jt	d}|jtd}t
|t|j	d|d||j
t|dddn#1swxYwYdS)	N).z..z.foozfoo.z.intzint.z.foo.barz	..foo.barz/./
nosuchbuiltinznosuchmodule.nosuchcallable)envarrrT)quietz*Ignoring unimportable $PYTHONBREAKPOINT: "r)
subTestrrrrrrror;messagecategoryRuntimeWarningr)rrrrs    rtest_envar_unimportablez&TestBreakpoint.test_envar_unimportable;s<	)	)EE**	
)	
)/4+,~33E/4J4JKKN00d1K1K1KLL  	NNIIIIKKK  ^<<<&&(((	
)	
)	
)	
)	
)	
)	
)	
)	
)	
)	
)	
)	
)	
)	
)
	)	)sCC//C3	6C3	cd|jd<td5}tt_t|ddddS#1swxYwYdSr)rrrrzrrrrs  r#test_envar_ignored_when_hook_is_setz2TestBreakpoint.test_envar_ignored_when_hook_is_setNs'1#$
:

	%$!$CLLL""$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%s4AA"AN)r2r3r4rrrrrrrprqrzr>ignore_environmentrrrrrrr5r"rrrsUFFF"""
444
4
4
4KKKJJJX_SY1>BB..CB.X_SY1>BB++CB+X_SY1>BB%%CB%+++X_SY1>BB))CB)$%%%%%r"rz,the pty and signal modules must be availablecZeZdZdZedZdZdZddZdZ	dZ
d	Zd
ZdZ
dS)
PtyTestszhTests that use a pseudo terminal to guarantee stdin and stdout are
    terminals in the test environmentcdSrr5)signumframes  r
handle_sighupzPtyTests.handle_sighup[s	
	
r"ctjtj|j}	|||tjtj|S#tjtj|wxYwr)signalSIGHUPr
_run_child)rchildterminal_input
old_sighups    r	run_childzPtyTests.run_childbs_]6=$2DEE
	5??5.99M&-4444FM&-4444sA!A<cPtj\}}	tj\}}nj#tt
f$rV}tj|tj||d|d}~wwxYw|dkr	tj|t|d5}||dddn#1swxYwYn#tjYnxYwtjdn#tjdwxYwtj|tj
||t|d5}	g}
	|	}|dkrn|
|C	dddn#1swxYwYt#|
dkrt%}		tj|d	}
n#t$rYnwxYw|
sn||
@tj||d
d}|dt#|
|fztj|t/j|d
|
S)Nzpty.fork() raised {}rrrrTrPrirrz9got %d lines in pipe but expected 2, child output was:
%s)exitcode)r(pipeptyforkOSErrorrZrUskipTestr0r	traceback	print_exc_exitr@r!ror,r%rr"rWdecoderrwait_process)rrrrrpidfdrwpiperpipelinesr?child_outputchunks              rrzPtyTests._run_childis!wyy1	hjjGC(			HQKKKHQKKKMM077::;;;		!88
!S\\!UE%LLL!!!!!!!!!!!!!!!
&#%%%%%	
^$$$!g
&
&
&	#%E
#~~''--//2::T"""
#
	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#u::??%;;L
+GB--EEE##E***
+
HRLLL'..wAALIIRU\23
4
4
4
	S1----s}/BABB $C(CC(C  C(#C $C('D(C?=DD-*AF>>GG,H
HHNc8tjrtjs|dfd}|||dz}||dddh|ddkr|dt|d}r|d	}n$|tjj	}|
||dS)
Nzstdin and stdout must be ttyscrztjtjdt_tjtjdt_t
dtjotj|t
tt|dS)Nsurrogateescape)rerrorsreplaceztty =file)
rV
TextIOWrapperrzrSdetachrprintisattyrrT)rrRstdio_encodings rrz'PtyTests.check_input_tty.<locals>.childs
@,SY-=-=-?-?6D4EGGG	 -cj.?.?.A.A7E5>@@@

'39++--E#*2C2C2E2EERRRR%f

&&U333333r"s
rz
tty = Trueztty = Falsez%standard IO in should have been a ttyr*r)rzrSrrrrrr rrro)rrRrrrrinput_resultr4s ` `    rcheck_input_ttyzPtyTests.check_input_ttysy!!	;):):)<)<	;MM9:::
	4
	4
	4
	4
	4
	4unw&>??

eAh} =>>>8|##MMABBBE!H~~	A%,,^=NOOHH%,,SY-?@@Hx00000r"c2|dddS)NrRsquux)rr&s rtest_input_ttyzPtyTests.test_input_ttys 	
Xw/////r"cPdtjvr|ddSdS)Nr!zthe readline module is loaded)rzmodulesrr&s rskip_if_readlinezPtyTests.skip_if_readlines2$$MM9:::::%$r"c\||ddddS)Npromptéquuxrrrr&s rtest_input_tty_non_asciiz!PtyTests.test_input_tty_non_ascii2Zg>>>>>r"c\||ddddS)Nrrrrr&s r'test_input_tty_non_ascii_unicode_errorsz0PtyTests.test_input_tty_non_ascii_unicode_errorsrr"chd}||d}d}|||dS)Nc0tdtj|t	jt_tdtdttj	|dS)Nzstdin.isatty():rrRz	captured:)
rrzrSrrVrWrrTrgetvalue)rs rrz3PtyTests.test_input_no_stdout_fileno.<locals>.childso#SY%5%5%7%7eDDDDCJ(OOO+uSZ%8%8%:%:;;%HHHHHHr"squux
)zstdin.isatty(): Truezcaptured: 'prompt')rassertSequenceEqual)rrrr4s    rtest_input_no_stdout_filenoz$PtyTests.test_input_no_stdout_filenosN	I	I	I
ui00
	
  11111r"r)r2r3r4r,r|rrrrrrrrrr5r"rrrVs))

\
555<<<|11114000
;;;???
???

2
2
2
2
2r"rc&eZdZdZdZdZdZdS)
TestSortedcRttd}|dd}tj|||t|||||tj|||t|d|||tj|||t|d|||dS)NrJc|Srr5r0s rrz'TestSorted.test_basic.<locals>.<lambda>s1"r"rT)reverse)rqrNrshufflerorrDr)rrcopys   r
test_basiczTestSorted.test_basicsE#JJAAAwtvd||,,,D$'''tvd===>>>D$'''tvdD999:::D$'''''r"cPtg|t5tgdddn#1swxYwYtgd|t5tgdddddS#1swxYwYdS)N)rr)rrrr&s rtest_bad_argumentszTestSorted.test_bad_argumentss$r





y
)
)	 	 B	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	rt


y
)
)		2t																		s#AAA=BB"Bc	d}tttg}|D];}|t	|t	||<dt
|}ttttttj	g}|D];}|t	|t	||<dS)NabracadabrarP)
rqr/r;rorrbr	frozensetrfromkeys)rrrTs    rtest_inputtypeszTestSorted.test_inputtypes	suc"	6	6AVAYYqqtt5555GGCFFOOc9dE4=A	6	6AVAYYqqtt5555	6	6r"cvd}|tt|dddS)Nz,The quick Brown fox Jumped over The lazy DogcdSrr5rs  rrz.TestSorted.test_baddecorator.<locals>.<lambda>	sQr")splitrrr)rrs  rtest_baddecoratorzTestSorted.test_baddecorator	s7=CCEE)VT4GGGGGr"N)r2r3r4rrrrr5r"rrrsU
(
(
(	6	6	6HHHHHr"rceZdZdZdS)ShutdownTestcd}td|d\}}}|ddg|dS)Nafif 1:
            import builtins
            import sys

            class C:
                def __del__(self):
                    print("before")
                    # Check that builtins still exist
                    len(())
                    print("after")

            c = C()
            # Make this module survive until builtins and sys are cleaned
            builtins.here = sys.modules[__name__]
            sys.here = sys.modules[__name__]
            # Create a reference loop so that this module needs to go
            # through a GC phase.
            here = sys.modules[__name__]
            z-cr)PYTHONIOENCODINGbeforeafter)rror
splitlines)rr7rcouterrs     rtest_cleanupzShutdownTest.test_cleanup	sd2(d9@BBBC(G,cjjll.E.E.G.GHHHHHr"N)r2r3r4rr5r"rrr	s(IIIIIr"rc>eZdZdZdZdZdZdZdZdZ	dZ
d	S)
TestTypectddi}||jd||jd||jt||jtf||jt|}|t||||j	|Gdd}td|tfddi}||jd||jd||jt||j|tf||jt|d|j|
d|j|d	}||d	|t||||j	|||d
||d||dd
ddS)Nrr5ceZdZdZdS)!TestType.test_new_type.<locals>.Bcd|zS)Nzham%dr5r&s rrz%TestType.test_new_type.<locals>.B.hamC	s~%r"N)r2r3r4rr5r"rrhrB	s#
&
&
&
&
&r"rhrracd|zS)Nzspam%sr5r&s rrz(TestType.test_new_type.<locals>.<lambda>E	s
hor"rrham42spam42rlittles*)rpror2r4r3	__bases__rr__base__ryrrrmrrrato_bytes)rrrrhrs     r
test_new_typezTestType.test_new_type7	sob"S)))---x000vi000

aj&)))
ACC

d1ggq!!!

ak1%%%	&	&	&	&	&	&	&	&
q#h)E)E FGGS)))---x000q#h///

aj#&&&

faj)))
+++
AbEEB

d1ggq!!!

ak1%%%'***8,,,Ax00+>>>>>r"c|t5tddiddddn#1swxYwY|t5tddiddddS#1swxYwYdS)Nrr5rr0r)rrrpr&s rtest_type_nokwargszTestType.test_type_nokwargsU	s


y
)
)	#	#b"""""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#


y
)
)	#	#br""""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#s;?? BBBc(dD]}||5t|di}||j|||j|||jtdddn#1swxYwY|t5tddidddn#1swxYwY|t5tddidddn#1swxYwY|t5tddidddn#1swxYwYtddi}dD]}||5||_||j|||jd||jtdddn#1swxYwYtddi}|t5d|_dddn#1swxYwY||jd|t5d|_dddn#1swxYwY||jd|t5d|_dddn#1swxYwY||jddS)N)rÄ🐍zB.A42rPr}r5zABuABr>r)
rrpror2r4r3rrUnicodeEncodeErrorr)rr~rrs    rtest_type_namezTestType.test_type_name[	s>	9	9D4((
9
9r2&&  T222  666  x888	
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9


z
*
*	#	#2r"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#


1
2
2	%	%R$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%


y
)
)		r2															
b">	9	9D4((
9
9!
  T222  555  x888	
9
9
9
9
9
9
9
9
9
9
9
9
9
9
9
b"


z
*
*	"	"!AJ	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"S)))


1
2
2	$	$#AJ	$	$	$	$	$	$	$	$	$	$	$	$	$	$	$S)))


y
)
)		AJ															S)))))sA(BB	B	5CCC8DDD;EE EAG99G=	G=	0IIIJJJK,,K03K0ctddddi}||jd||jd||jt|t5tddddidddn#1swxYwY||jdd|_||jd||jd|t5d|_dddn#1swxYwY||jddS)Nrr5r4zB.Cr_zD.E)rpror2r4r3rr)rrs  rtest_type_qualnamezTestType.test_type_qualname|	sb>5122S)))///x000


y
)
)	2	2b>40111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2///S)))///


y
)
)	"	"!AN	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"/////s$B$$B(+B(!D55D9<D9cdD]0}tddd|i}||j|1|t5tddddidddn#1swxYwYtddi}||jddD]$}||_||j|%dS)N)rr-r.xyxrNrr5r,xy)rr-r.r5r7r6rN)rpror,rr0)rr'rs   r
test_type_doczTestType.test_type_doc	s)F	-	-CS"y#.//AQY,,,,


1
2
2	3	3b9j1222	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3
b"D)))R	-	-CAIQY,,,,	-	-sA..A25A2c|t5tdddn#1swxYwY|t5tdddddn#1swxYwY|t5tddiddddn#1swxYwY|t5tddidddn#1swxYwY|t5tdgidddn#1swxYwY|t5tddtjidddn#1swxYwY|t5tddidddn#1swxYwY|t5tdt
fidddn#1swxYwY|t5tdttfiddddS#1swxYwYdS)Nrr5r*r)rrrprMappingProxyTyperRrr;r&s r
test_bad_argszTestType.test_bad_args	sl


y
)
)		FFF															


y
)
)		bMMM															


y
)
)	"	"b"b!!!	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"


y
)
)	#	#br""""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#


y
)
)		b"															


y
)
)	6	6b%044555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6


y
)
)	#	#gr"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#


y
)
)	#	#tgr"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#


y
)
)	&	&sCj"%%%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&s6::A88A<?A<B<<CC!DDD%EE
E($FFF=GG"GH$$H(+H(	I44I8;I8c|t5tddddidddn#1swxYwY|t5tdtfddidddn#1swxYwY|t5tddddidddn#1swxYwY|t5tddddidddn#1swxYwY|t5tddddidddn#1swxYwY|t5tdddd	d
dddn#1swxYwY|t5tddddidddn#1swxYwY|t5tddddidddn#1swxYwYGd
d}|t5td|fddidddn#1swxYwY|t5td|fddiddddS#1swxYwYdS)Nrr5rvr6rrPr/r5r)rvr)rmrm)__weakref__r=ceZdZdS)"TestType.test_bad_slots.<locals>.BNrr5r"rrhr?	rr"rhrmr=)rrrprr)rrhs  rtest_bad_slotszTestType.test_bad_slots	sf


y
)
)	/	/b;-...	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/


y
)
)	2	2sf{C0111	2	2	2	2	2	2	2	2	2	2	2	2	2	2	2


y
)
)	-	-b;+,,,	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-


y
)
)	/	/b;-...	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/


y
)
)	3	3b;1222	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3


z
*
*	6	6b!44555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6


y
)
)	C	Cb;(@ABBB	C	C	C	C	C	C	C	C	C	C	C	C	C	C	C


y
)
)	I	Ib;(FGHHH	I	I	I	I	I	I	I	I	I	I	I	I	I	I	I								


y
)
)	7	7qd[*5666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7


y
)
)	:	:qd[-8999	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:	:s;?? BB

B
+CCC0DDD5EEE:FF"FG  G$'G$H%%H),H)I88I<?I<J??KKcHtjddg}|dt|}tdd|}|t|jddddgdS)N)rr*)rrrrr5r)rOrderedDictmove_to_endrqrrprorm)rodr4rs    rtest_namespace_orderzTestType.test_namespace_order	s

$h%9
:
:
s

##b"aj..0011"1"5(7KLLLLLr"N)r2r3r4r(r+r1r3r8r;r@rEr5r"rrr6	s???<###***B000 ---&&&(:::2MMMMMr"rcXddlm}||t|S)Nr)DocTestSuite)doctestrGaddTestr)loadertestspatternrGs    r
load_testsrM	s5$$$$$$	MM,,x(()))Lr"r)Nr-rRrrrtrvrSrVr*r(rlrwrrFrzrrrpr
contextlibr	functoolsrinspectr	itertoolsrtextwraprrr	r
operatorrrrtest.supportr
rtest.support.os_helperrrrtest.support.script_helperrtest.support.warnings_helperr
unittest.mockrrrrrrr7r=rrrr;rgtest_conv_no_signtest_conv_signrSr[rdrhTestCaserjr
skipUnlessrrrrrMr2mainr5r"r<module>r^s


								



				







				



            <<<<<<<<<<AAAAAAAAHHHHHHHHHH777777777777********C&&& $







	$	
ck		CK(		Z 	Z	j	Z 	
$%9	:	:C@	UZ '.			
+	
ck		CK(		*	Z 	Z	j	Z 	
$%9	:	:C@	UZ ',a1a1a1a1a1(#a1a1a1H;f%f%f%f%f%X&f%f%f%RSHIIP2P2P2P2P2x P2P2JIP2d(H(H(H(H(H"(H(H(HVIIIII8$IIIDWMWMWMWMWMx WMWMWMt
zHMOOOOOs(B11	B=<B=