All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Lib.test.pbcvm.test.test_builtin_pyc.pyc Maven / Gradle / Ivy

Go to download

Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.

There is a newer version: 2.7.4
Show newest version
?
#3Xc@sdddlZddlZddlmZmZmZmZmZmZm	Z	ddl
Z
ddlmZddl
Z
ddlZddlZddlZdadfd??YZdfd??YZd	fd
??YZdfd??YZd
fd??YZdejfd??YZdejfd??YZd?Zed?Zedkr`ede?ndS(i????N(tfcmpthave_unicodetTESTFNtunlinktrun_unittesttcheck_py3k_warningst	is_jython(tnegitSquarescBs#eZd?Zd?Zd?ZRS(cCs||_g|_dS(N(tmaxtsofar(tselfR	((stest_builtin_pyc.pyt__init__s	cCs
t|j?S(N(tlenR
(R((stest_builtin_pyc.pyt__len__scCssd|ko|jkns(t?nt|j?}x.||krg|jj||?|d7}q:W|j|S(Nii(R	t
IndexErrorR
R
tappend(Rtitn((stest_builtin_pyc.pyt__getitem__s	(t__name__t
__module__RRR(((stest_builtin_pyc.pyRs		t
StrSquarescBs#eZd?Zd?Zd?ZRS(cCs||_g|_dS(N(R	R
(RR	((stest_builtin_pyc.pyR#s	cCs
t|j?S(N(R
R
(R((stest_builtin_pyc.pyR'scCsyd|ko|jkns(t?nt|j?}x4||krm|jjt||??|d7}q:W|j|S(Nii(R	RR
R
Rtstr(RRR((stest_builtin_pyc.pyR*s	(RRRRR(((stest_builtin_pyc.pyR!s		t	BitBucketcBseZd?ZRS(cCsdS(N((Rtline((stest_builtin_pyc.pytwrite4s(RRR(((stest_builtin_pyc.pyR3stTestFailingBoolcBseZd?ZRS(cCs
t?dS(N(tRuntimeError(R((stest_builtin_pyc.pyt__nonzero__9s(RRR(((stest_builtin_pyc.pyR8stTestFailingItercBseZd?ZRS(cCs
t?dS(N(R(R((stest_builtin_pyc.pyt__iter__=s(RRR(((stest_builtin_pyc.pyR<stBuiltinTestcBs?eZd?Zd?Zd?Zd?Zd?Zd?Zd?Zd?Z	d?Z
d	?Zd
?Zd?Z
d?Zd
?Zd?Zd?ZdZeed?Zejd?ejd?ej?edef??ee?WdQXd?Zd?Zd?Zd?Zd?Zd?Z d?Z!d?Z"d?Z#d?Z$d ?Z%d!?Z&d"?Z'd#?Z(d$?Z)d%?Z*d&?Z+d'?Z,d(?Z-d)?Z.d*?Z/d+?Z0d,?Z1d-?Z2d.?Z3d/?Z4d0?Z5d1?Z6e7j8?j9d2?oe7j:?j9d3?Z;e<dE?dFkZ=e>j?e;o9e=d6?d7??Z@d8?ZAd9?ZBd:?ZCd;?ZDeEd<??ZFeEd=??ZGd>eHfd???YZId@?ZJdA?ZKdB?ZLdC?ZMdD?ZNRS(GcCs?td?td?td?tdd?tdddd?|jttd?|jttdd	d
d?|jttd?|jttddd?dS(
Ntsysttimetstringtnametlevelitspamspamiiiit(t
__import__tassertRaisestImportErrort	TypeErrort
ValueError(R((stest_builtin_pyc.pyttest_importBs



cCs||jtd?d?|jtd?d?|jtd?d?|jttjd?dk?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd	?d	?|jtd
?d	?|jttd?|jtt?d?|jtt?d?|jtt?|jttd?dt
fd
??Y}|jt|??d?dS(Nii?i.???igg??Q?	@g??Q?	?ll?l?????tatAbsClasscBseZd?ZRS(cSsdS(Ni????((R((stest_builtin_pyc.pyt__abs__ds(RRR0(((stest_builtin_pyc.pyR/csi????(tassertEqualtabst
assertTrueR!tmaxintR)R+tTruetFalsetNonetobject(RR/((stest_builtin_pyc.pyttest_absMs"!cCsI|jtdddg?t?|jtdddg?t?|jttdt?dg?|jttt??|jt	td?|jt	t?|jt	tdddgg?|jtg?t?|jtdt?g?t?ddg}|jtd?|D??t?dd	dg}|jtd
?|D??t?dS(Niiii
ii2i<css|]}|dkVqdS(i*N((t.0tx((stest_builtin_pyc.pys	ssi(css|]}|dkVqdS(i*N((R:R;((stest_builtin_pyc.pys	us(
R1tallR5R7R6R)RRRR+(RtS((stest_builtin_pyc.pyttest_allhs cCsL|jtdddg?t?|jtdddg?t?|jttdt?dg?|jttt??|jt	td?|jt	t?|jt	tdddgg?|jtg?t?|jtdt?g?t?dddg}|jtd	?|D??t?dd
dg}|jtd?|D??t?dS(Niii
iii(i<icss|]}|dkVqdS(i*N((R:R;((stest_builtin_pyc.pys	?sicss|]}|dkVqdS(i*N((R:R;((stest_builtin_pyc.pys	?s(
R1tanyR7R6R5R)RRRR+(RR=((stest_builtin_pyc.pyttest_anyws cCs@tjd}|jt|t??|j|tjd?dS(Ni(R!R4R3t
isinstancetintR1(RR;((stest_builtin_pyc.pyttest_neg?scs??fd?}?fd?}?fd?}?fd?}t|d
?t|d?t|d?t|d
?ttdi??jtttdidd6??jtt??jtttd	??jtttdd	?dS(Ncs?j|d?dS(N((R1(targs(R(stest_builtin_pyc.pytf0?scs?j|d?dS(Ni(R1(ta1(R(stest_builtin_pyc.pytf1?scs$?j|d??j|d?dS(Nii(R1(RFta2(R(stest_builtin_pyc.pytf2?scs4?j|d??j|d??j|d?dS(Niii(R1(RFRHta3(R(stest_builtin_pyc.pytf3?siiitfooi*((i(ii(iii(i(i(i*(tapplytidR)R+(RRERGRIRK((Rstest_builtin_pyc.pyt
test_apply?s



 c
Cs|jtt??|jtd??|jtt??|jtd???|jtt??d?}|jt|??ddd??Y}|jt|??|?}|jt|j??|jt|??dtfd??Y}|jt|??|?}|jt|j??|jt|??d|_|jt|??|`|jt|??d|_|jt|??|`|jt|??dtfd	??Y}|?}|jt|??d
|fd??Y}|?}	|jt|	??dS(
NR.cSs||S(N((R;ty((stest_builtin_pyc.pyt?scSsdS(N((((stest_builtin_pyc.pytf?stClassiccBseZd?ZRS(cSsdS(N((R((stest_builtin_pyc.pytmeth?s(RRRT(((stest_builtin_pyc.pyRS?stNewStylecBseZd?ZRS(cSsdS(N((R((stest_builtin_pyc.pyRT?s(RRRT(((stest_builtin_pyc.pyRU?stN2cBseZd?ZRS(cSsdS(N((R((stest_builtin_pyc.pyt__call__?s(RRRW(((stest_builtin_pyc.pyRV?stN3cBseZRS((RR(((stest_builtin_pyc.pyRX?s((	R3tcallableR
tassertFalset__builtins__RTR8R7RW(
RRRRStcRURRVtn2RXtn3((stest_builtin_pyc.pyt
test_callable?s>							cCs|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jttd	?|jtt?dS(
Ni t iAtAiaR.i?s?i(R1tchrR)R,R+(R((stest_builtin_pyc.pyttest_chr?scCs?|jtdd?d?|jtdd?d?|jtdd?d?g}|j|?g}|j|?ddlm}|?}|j|?tr|jt||?d?|jt||?d?|jt||?d?|jt||?d?nX|jtt||?|jtt||?|jtt||?|jtt||?|j?|j?|j?|jtt?dS(Ni????ii(tUserList(	R1tcmpRRdRR)RtpopR+(RR.tbRdR\((stest_builtin_pyc.pyttest_cmp?s.

	



cCs?|jttdd?d??|jtdd?d?|jttdd?d
??|jtt?ddd??Y}|jttd|??|jttdtd	d
??dS(Nig????????g??lt	BadNumbercBseZd?ZRS(cSs
t?dS(N(R,(Rtother((stest_builtin_pyc.pyt
__coerce__?s(RRRk(((stest_builtin_pyc.pyRi?si*g??t12345i?(g??g????????(ll(g??g????????((	R3RtcoerceR1R)R+R,t
OverflowErrorRB(RRi((stest_builtin_pyc.pyttest_coerce?s  cCsntddd?d}t|ddd?tddddd	d?td
ddddd
d	d?tddd
dd	d?|jtt?|jttddd?|jttdddd?|jtttd?dd?|jttdddd	ddd
dd?trjttdd?dd?|jtttd?dd?|jtttd?dd?ndS(Nsprint 1
R'texecstsourcetpasstfilenamet?tmodetdont_inheritittmpt0tevalis	print 42
stbadmodetsinglei?RRsprint u"å"
tutf8sa = 1tbad(tcompileR)R+R,RbRtunicodetunichr(Rtbom((stest_builtin_pyc.pyttest_compile?s cCs6ddl}d|_t|d?|jtt?dS(Ni????itspam(R!R?tdelattrR)R+(RR!((stest_builtin_pyc.pyttest_delattrs	
cCs?|jttdd?d}|jdt??ddl}|jdt|??ddl}d|jfd??Y}|d?}|jtt|?|jd	tt??|jd
tt??dt	fd??Y}|?}|jdt|??dt	fd
??Y}|?}|jdt|??dt	fd??Y}|?}|jdt|??|jdt|??dt	fd??Y}|?}|j
t|?dddgk?dt	fd??Y}|?}|jtt|?dS(Ni*it	local_vari????texittFoocBseZdZRS(i(RRt__dict__(((stest_builtin_pyc.pyR?sRLtstript__mro__cBseZd?ZRS(cSsd|_d|_d|_dS(Niii	(R;RPtz(R((stest_builtin_pyc.pyR*s		(RRR(((stest_builtin_pyc.pyR?)sRPcBseZgZRS((RRt	__slots__(((stest_builtin_pyc.pyR?2st__repr__cBseZddgZd?ZRS(t	__class__R?cSs
d|_dS(Ntwow(tbar(R((stest_builtin_pyc.pyR;s(RRR?R(((stest_builtin_pyc.pyR?9sR?cBseZd?ZRS(cSs
dddgS(Ntkantgatroo((R((stest_builtin_pyc.pyt__dir__Cs(RRR?(((stest_builtin_pyc.pyR?BsR?R?R?cBseZd?ZRS(cSsdS(Ni((R((stest_builtin_pyc.pyR?Js(RRR?(((stest_builtin_pyc.pyR?Is(R)R+tdirtassertInR!ttypest
ModuleTypeRtassertNotInR8R3(RR?R!R?R?RR((stest_builtin_pyc.pyttest_dirs6				"	cCs?|jtdd?d?|jtdd?d ?|jtdd?d!?|jtdd?d"?|jtd
d?d#?|jtdd?d$?|jtd
d?d%?|jtdd?d&?|jtdd?d'?|jtdd?d(?|jtd
d?d)?|jtdd?d*?|jttjdd?tjddf?|jttdd?d+??|jttdd?d,??|jttdd?d-??|jttdd?d.??|jtt?dS(/Niiiii????i????ii????i????lllll????l????ll????l????i????ig
@g??g@g??g
?g?g??g?g?gп(ii(i????i(i????i????(ii????(ll(l????l(l????l????(ll????(il(i????l(l????i????(li????(g@g??(g?g??(g?g?(g@gп(R1tdivmodR!R4R3RR)R+(R((stest_builtin_pyc.pyttest_divmodOs&    cCs0|jtd?d?|jtd?d?idd6dd6}idd6dd	6}|jtd|?d?|jtd||?d?|jtd||?d?|jtd	||?d?tr|jttd??d?|jttd??d?nidd6dd6}idd6dd	6}tr	|jttd?|?d?|jttd?||?d?|jttd?||?d?|jttd	?||?d?d
}|jt|d||?d?|jttdd?|?td
d??n|jtt?|jttd?dS(Ns1+1is 1+1
iR.Rgi?i,R\ssu"å"R|så((R1RyRRR)R+(RtglobalstlocalsR?((stest_builtin_pyc.pyt	test_evalis0""" c
Csyddd??Y}|?}t?}|jtd||?d?|jttd||?|jtd||?td??|jtd||?|?|jtd	||?|?tr?|jtd|?d?n|jttd|?d
dd??Y}|?}|jttd||?dtfd
??Y}|?}|jtd||?d?|jttd||?|jtd||?td??|jtd||?|?|jtd	||?|?td||?td|t	j	??ddd??Y}|?}d|d			"		"	


itwsz = z+1
sz = z*2
sexecfile.. not supported in 3.xNcCsatr
dStd7aidd6dd6}idd6dd6}|j|jjd?d|d	?|jttdd??|jtdd?d?|jtd?d ?d!?|jttdd?d"t	fd#??Y}|jttd$?|d ??d%t	fd&??Y}|jttd'?|d ??d(t	f?fd)??Y?|jtd*??d ??d+?d,t	fd-??Y}|jtd.?|d ??d/?t
rE|jtdtd??td??|jtd0?td ??td!??|jttdtd??|jttd1?|td ???d2tfd3??Y}|jttd4?|d ??d5tf?fd6??Y?|jtd7??d ??td+??d8tfd9??Y}|jtd:?|d ??td/??ndS(@NcSsd|kodkSS(NR.R?((R\((stest_builtin_pyc.pyRQssHello WorldtelloorldithelloiR'i	icSs
|dkS(Ni((R;((stest_builtin_pyc.pyRQsi????ii
iiii$i1i@iQcSs|dS(Ni((R;((stest_builtin_pyc.pyRQscSsdS(Ni((R?((stest_builtin_pyc.pytidentitysitBadSeqcBseZd?ZRS(cSs|dkrdSt?dS(Nii*(R,(Rtindex((stest_builtin_pyc.pyR
s(RRR(((stest_builtin_pyc.pyR?scSs|S(N((R;((stest_builtin_pyc.pyRQscSsdS(N((((stest_builtin_pyc.pytbadfuncscSs
|dkS(Ni((R;((stest_builtin_pyc.pyRQsi*t12cSs
|dkS(Nt3((R;((stest_builtin_pyc.pyRQst1234t34tbadstrcBseZd?ZRS(cSs
t?dS(N(R,(RR?((stest_builtin_pyc.pyR s(RRR(((stest_builtin_pyc.pyR?scSs
|dkS(NR?((R;((stest_builtin_pyc.pyRQ"stbadstr2cBseZd?ZRS(cSsdS(Ni*((RR?((stest_builtin_pyc.pyR%s(RRR(((stest_builtin_pyc.pyR?$scSs
|dkS(Ni*((R;((stest_builtin_pyc.pyRQ'stweirdstrcseZ?fd?ZRS(cs?dtj||??S(Ni(RR(RR?(R?(stest_builtin_pyc.pyR*s(RRR((R?(stest_builtin_pyc.pyR?)scSs
|dkS(Nt33((R;((stest_builtin_pyc.pyRQ,st3344tshiftstrcBseZd?ZRS(cSs tttj||??d?S(Ni(RbtordRR(RR?((stest_builtin_pyc.pyR/s(RRR(((stest_builtin_pyc.pyR?.scSs
|dkS(NR?((R;((stest_builtin_pyc.pyRQ1st345cSs
|dkS(NR?((R;((stest_builtin_pyc.pyRQ6scSs
|dkS(NR?((R;((stest_builtin_pyc.pyRQ8st
badunicodecBseZd?ZRS(cSsdS(Ni*((RR?((stest_builtin_pyc.pyR;s(RRR(((stest_builtin_pyc.pyR?:scSs
|dkS(Ni*((R;((stest_builtin_pyc.pyRQ=stweirdunicodecseZ?fd?ZRS(cs?dtj||??S(Ni(RR(RR?(R?(stest_builtin_pyc.pyR@s(RRR((R?(stest_builtin_pyc.pyR??scSs|td?kS(NR?(R(R;((stest_builtin_pyc.pyRQCstshiftunicodecBseZd?ZRS(cSs tttj||??d?S(Ni(R?R?RR(RR?((stest_builtin_pyc.pyRFs(RRR(((stest_builtin_pyc.pyR?EscSs|td?kS(NR?(R(R;((stest_builtin_pyc.pyRQIs(ii(ii(iiii(ii(ii(R1tfilterR7RR)R+R8R,trangeRRR(	RR?R?R?R?R?R?R?R?((R?R?stest_builtin_pyc.pyttest_filtersPC4:1		""%(%"cCsxdtd?f}dtfd??Y}dtfd??Y}iidd6dd6|6idd6dd
6|6}tr?dtfd??Y}it?t?6td?td
?6||dD]6}y|e?UWnek
r?q?X|j|?q?W|jedde?d?|jedde?d?|jeddde?d?ged?D]}ejd?^qi}e	d?|D??}|j
}|je|d|?ee|?d|?d?dS(Nt123123R?iiilg@lg@g??lsmax(key=int)smax(1, key=int)smax(1, 2, keystone=int)smax(1, 2, key=int, abc=int)smax(1, 2, key=1)R?idi?css$|]}|tjd?fVqdS(i2N(trandomt	randrange(R:telem((stest_builtin_pyc.pys	{si????(iiiiii(smax(key=int)smax(1, key=int)smax(1, 2, keystone=int)smax(1, 2, key=int, abc=int)smax(1, 2, key=1)(i(ii(
R1R	R?R+tfailRR?R*R+R?Rtsortedtreversed(RtstmtRtdataR?RR((stest_builtin_pyc.pyttest_max^s4(

(	cBsa|jed?d?|jeddd?d?|jed?d?|jeddddddg?d?|jeddd?d?|jedd	d?d?|jed
dd?d
?|jee?|jeed?|jeed?d
dd??Y}|jee|??ddd??Y}|jeed|?f?x>dD]6}y|e?UWnek
r?qYX|j|?qYW|jed de?d?|jed!de?d?|jeddde?d?ged?D]}e	j
d?^q?}ed?|D??}|j}|je|d|?e
|d|?d?dS("NR)Riiilg@lg@g??li*R?cBseZd?ZRS(cSs
t?dS(N(R,(RR?((stest_builtin_pyc.pyR?s(RRR(((stest_builtin_pyc.pyR??sRicBseZd?ZRS(cSs
t?dS(N(R,(RRj((stest_builtin_pyc.pyt__cmp__?s(RRR3(((stest_builtin_pyc.pyRi?ssmin(key=int)smin(1, key=int)smin(1, 2, keystone=int)smin(1, 2, key=int, abc=int)smin(1, 2, key=1)R?idi?css$|]}|tjd?fVqdS(i2N(R*R+(R:R,((stest_builtin_pyc.pys	?si(iiiiii((((smin(key=int)smin(1, key=int)smin(1, 2, keystone=int)smin(1, 2, key=int, abc=int)smin(1, 2, key=1)(i(ii(R1tminR)R+R,R?R-RR?R*R+R?RR.(RR?RiR0RR1R?RR((stest_builtin_pyc.pyttest_min?sB(

(	cCs&ttd??}|jt|?d?|jt|?d?|jtt|?|jtt|?|jt|d?d?dtfd??Y}t|??}|jt|d?d?|jtt|?d?}|?}|jt|?d?|jtt|?|jt|d?d?dS(Niiii*tItercBseZd?Zd?ZRS(cSs|S(N((R((stest_builtin_pyc.pyR?scSs
t?dS(N(R(R((stest_builtin_pyc.pyR?s(RRRR(((stest_builtin_pyc.pyR6?s	css	dVdS(Ni((((stest_builtin_pyc.pytgen?s(RR?R1RR)RR8(RtitR6R7((stest_builtin_pyc.pyt	test_next?s		cCso|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jttd	?dS(
Nidt0144ldt0144Li????s-0144l????ds-0144L((R1toctR)R+(R((stest_builtin_pyc.pyttest_oct?s
cCs?ttd?}zg|jd?|jd?|jd?|jd?|jd?|jdd?|jdd?Wd|j?XdS(	NR?s1+1
s+The quick brown fox jumps over the lazy dogs.
s
Dear John
tXXXidtYYY(topenRRtclose(Rtfp((stest_builtin_pyc.pytwrite_testfile?s




cCs?|j?ttd?}z?|j|jd?d?|j|jd?d?|j|j?d?|j|jd?d?|j|jd?d?|j|jd?d	d?|j|jd
?dd?Wd|j?Xtt?dS(NRis1+1
s-The quick brown fox jumps over the lazy dog.
tDearids John
i,R>i?R?(RCR@RR1treadlinetreadRAR(RRB((stest_builtin_pyc.pyt	test_open?s
!cCs?|jtd?d?|jtd?d?|jtd?d?trm|jtttj??tj?n|jttd?tr?|jtttd??ndS(	NR`i RaiAR.iai*R?(	R1R?RR?R!R?R)R+R(R((stest_builtin_pyc.pyttest_ord?s%c	Cs?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d"?|jtdd?d$?|jtdd?d?|jtdd?d?|jtdd?d	?|jtdd
?d?|jtdd?d?|jtdd?d?|jtd
d?d?|jtd
d?d?|jtdd?d?|jtdd?d?|jtdd?d%?|jtdd?d'?|jtdd?d?|jtdd?d?|jtdd?d	?|jtdd
?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd?d(?|jtdd?d*?|jtdd?d?|jtdd?d?|jtdd?d?|jtdd
?d?x?d+D]?}x?d,D]|}xsd-D]k}t|t?s?t|t?s?t|t?r?|jtt|||?q?|jt|||?d?q?Wq?Wq?W|jttddd
?|jttddd?|jttddd?|jttd
dd?|jttd d!?|jtt?dS(.Niiii
iiii????iii????llll????gg??g@g?@g?g@g ?l
g$@i?l?g@?@g8@i????l????lg{?G?fu?g?ʡE????iii@iii@g0Ag0Ag?A(ilg@(i
l
g$@(i?l?g@?@(R1R"tassertAlmostEqualRAtfloatR)R+R,(RR;RPR?((stest_builtin_pyc.pyttest_pow?sd


(cCsF|jtd?dddg?|jtdd?ddddg?|jtd?g?|jtd?g?|jtddd?ddd	g?|jtdd
d?ddddg?|jtd"?g?|jtdd$?g?|jtdd%d?g?|jtdd&d?g?tdtj?}td
tj?}tdtj?}|jt||d?||dg?|jt|d|d?|d|dg?|jt|d|d?|d|dg?t|||?}|j||?|j||?|jt|?d?t|||?}|j||?|j||?|jt|?d?t|||?}|j||?|j||?|jt|?d?|jt	t?|jt	tdddd?|jt
tddd?|jt
t||dtd??dtfd??Y}|jtt||d|d??|jt	tddd?|jt	tddd?|jt	tdd?|jt	tddd?|jt
ttjtj?|jt
tddtj?dtj}d}dd'd??Y}|jt||?||d??|g?|jt||?||d??|g?dtfd??Y}	|jt|	|?|	|d??|g?|jt|	|?|	|d??|g?dtfd??Y}
|jtt|
??dtfd??Y}|jt	t|??|jt	td ?|jt	tdd ?|jt	td d?|jt	td d ?|jt	tddd?|jt	tdd d?|jt	tdd d?|jt	td dd?|jt	td dd?|jt	td d d?|jt	td d d?dS((Niiiiiii????i
ii????i????i????idi2l????i????tbadzerocBseZd?ZdZRS(cSs
t?dS(N(R(RRj((stest_builtin_pyc.pyR3csN(RRR3R7R?(((stest_builtin_pyc.pyRLbs	g??g}Ô%?I?Tg\??n??TR?i*tI0cBseZd?Zd?ZRS(cSst|?|_dS(N(RBR(RR((stest_builtin_pyc.pyRvscSs|jS(N(R(R((stest_builtin_pyc.pyt__int__xs(RRRRN(((stest_builtin_pyc.pyRMus	tI1cBseZd?Zd?ZRS(cSst|?|_dS(N(RBR(RR((stest_builtin_pyc.pyRscSs|jS(N(R(R((stest_builtin_pyc.pyRN?s(RRRRN(((stest_builtin_pyc.pyRO~s	tIXcBseZd?ZRS(cSs
t?dS(N(R(R((stest_builtin_pyc.pyRN?s(RRRN(((stest_builtin_pyc.pyRP?stINcBseZd?ZRS(cSsdS(Nsnot a number((R((stest_builtin_pyc.pyRN?s(RRRN(((stest_builtin_pyc.pyRQ?sgll????ll????ll((R1R?R?R!R4R?R?R
R)R+R,RBRRnR8(RR.RgR\tseqRLtbignumtsmallnumRMRORPRQ((stest_builtin_pyc.pyt
test_range8s~%%('..##
,,,,cBsg|j?eed?}ej}ej}z|e_e?e_|je?d?|jed?d?|je	?d?|je	d?d?|e_ejj
?|jee?e?e_e
jd?e_|jeedd?e
jd?e_|je?d	?e
j?e_|jee?e
jd
?e_e
j?e_eddd
?dUejjdd?eddd
?dUejjdd?eddd
?dUdddkr?dddg}ndddg}|jejj?j?|?e`|jeed?e`|jeed?Wd|e_|e_|j
?ee?XdS(NRistesting
s,The quick brown fox jumps over the lazy dog.s	Dear JohntNULLi*s    'whitespace't
whitespaces1/2s
print input()ttest_builtin_tmpRpis-from __future__ import division;print input()iRxs0.5tprompt(RCR@RR!tstdinR?RR1tinputt	raw_inputRAR)R,t	cStringIOtStringIOR+tEOFErrorR~tseektgetvaluet
splitlinesRR(RRBt	savestdint
savestdouttexpected((stest_builtin_pyc.pyttest_input_and_raw_input?sR
				
		
cCs?d?}|jt|dddgd?d?|jt|ddggddggg?ddddg?|jtd	?td
d?d?d
?|jtd?td
d?d?d?|jt|td??d?|jt|td?d?d?|jt|td?d?d?|jtt?|jttd?|jttdd?|jttddd?|jttdtd??|jtt|d?|jtdd?d?|jtddd?d?|jttdd?|jtt|g?|jtt|d?|jtt|d?|jt|gd?d?|jt|gd?d?ddd??Y}|jttd|??dS(NcSs||S(N((R;RP((stest_builtin_pyc.pyRQ?sR.RgR\R'RR?R?cSs||S(N((R;RP((stest_builtin_pyc.pyRQ?siiii?cSs||S(N((R;RP((stest_builtin_pyc.pyRQ?sillh?i
iii*iRR?cBseZd?ZRS(cSs
t?dS(N(R,(RR?((stest_builtin_pyc.pyR?s(RRR(((stest_builtin_pyc.pyR??s(i*i*(((R1treduceR?RR)R+R7R,(RtaddR?((stest_builtin_pyc.pyttest_reduce?s8	%$(""cCs0ddl}t|?ddl}t|?dS(Ni????(tmarshaltreloadR#(RRjR#((stest_builtin_pyc.pyttest_reloads
cCs?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtg?d?|jti?d	?g}|j|?|jt|?d
?i}||d<|jt|?d?dS(
NR's''iRxlt0Ls()s[]s{}s[[...]]s
{0: {...}}((R1treprR(RR.((stest_builtin_pyc.pyt	test_reprs

cCsn|jtd?d?|jttd??t?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd	?d	?|jtd
?d?|jtd?d?|jtd?d?|jtd
?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtd?d?|jtdd?d?|jttdd??t?|jttdd??t?|jttdd??t?|jtd?d?|jtd?d?|jtd?d ?|jtd!?d"?|jtd?d?|jtd#?d#?|jtd$?d$?|jttd??t?|jttd$d??t?|jttd$d??t?|jttd$d??t?|jtd%dd&d?d?|jtt?d'tfd(??Y}d)tfd*??Y}|jt|??d+?|jttdd,d-?|jtt|??|?}d.?|_|jtt|?|jtt|d?dS(/Ngg??g$@ge??Ag@??x?Dg?g$?ge???g@??x??g????????g????????g333333$@g??e??Ag???????g333333$?g??e???g????????g??????#@g33??d??Ag???????g??????#?g33??d???g ?i????iig@ig@ig?i????g?i????ii????tnumbertndigitst	TestRoundcBseZd?ZRS(cSsdS(Ng7@((R((stest_builtin_pyc.pyt	__float__Ps(RRRs(((stest_builtin_pyc.pyRrOstTestNoRoundcBseZRS((RR(((stest_builtin_pyc.pyRtSsiiicWs|S(N((RD((stest_builtin_pyc.pyRQ\s(R1troundR?RJR)R+R8Rs(RRrRttt((stest_builtin_pyc.pyt
test_roundsb	tLinuxtalphag??7y?1CisItest will fail;  failure is probably due to a buggy system round functioncCsr|jtd?d?|jtd?d?|jtd?d?|jtd	?d
?|jtd?d?dS(
Ng??7y?1Ciiig??7y?1Cg??7y?1Cg??7y?1Cg??7y?1Cg??7y?1Cg??7y?1Cg??7y?1Cg??7y?1C(R1Ru(R((stest_builtin_pyc.pyttest_round_largejs
cCsPttdd?|jtjd?|jtttdd?|jtt?dS(NR?i(RR!R1R?R)R+(R((stest_builtin_pyc.pyttest_setattruscCs?|jtg?d?|jttdd??d?|jtttdd???d?|jttd??d?|jtttd???d?|jtdgdgdggg?dddg?|jtt?|jttd	?|jttd
ddg?|jttd
ddgd
?|jttdgdgdgg?|jttidd6g?|jttidd6gdidd6?ddd??Y}|jtt|??g}td?td?D?|?|j|g?dS(Niiiii
iiii*R.RgR\R'R?cBseZd?ZRS(cSs
t?dS(N(R,(RR?((stest_builtin_pyc.pyR?s(RRR(((stest_builtin_pyc.pyR??scss|]}|gVqdS(N((R:R;((stest_builtin_pyc.pys	?s((R1tsumR?RRR)R+R,(RR?tempty((stest_builtin_pyc.pyttest_sum{s$%"4%+cCs<|jtd?td??|jtd?td??dS(NR'R?((R1R?tassertNotEqual(R((stest_builtin_pyc.pyt	test_type?scCs?tr?|jtd?td??|jtd?td??|jtd?td??|jttj?tdtjd??|jtttjd	?|jtt?|jt	tftd?ndS(Ni R`iARaiaR.s\U%08xsunicode-escapeiiI(
RR1R?RR!R?R)R,R+Rn(R((stest_builtin_pyc.pyttest_unichr?scCst?S(N(tvars(((stest_builtin_pyc.pytget_vars_f0?scCstj?d}d}t?S(Nii(R R?R?(R.Rg((stest_builtin_pyc.pytget_vars_f2?s
t
C_get_varscBs eZd?Zede?ZRS(cCsidd6S(NiR.((R((stest_builtin_pyc.pytgetDict?stfget(RRR?tpropertyR?(((stest_builtin_pyc.pyR??s	cCs?|jtt??tt???ddl}|jtt|??tt|???|j|j?i?|j|j?idd6dd6?|jttdd?|jttd?|jt|j	??idd6?dS(Ni????iR.iRgi*(
R1tsetR?R?R!R?R?R)R+R?(RR!((stest_builtin_pyc.pyt	test_vars?s"($cCs?d}d}dddg}|jt||?|?dddg}|jt||?|?d}|jt||?|?ddd	??Y}|jt||??|?|jt?g?|jtg?g?|jttd?d
dd??Y}|jtt||??ddd
??Y}|jt|?td??tttd????ddd??Y}|jt	t|?|??dS(NiiiiiiitIcBseZd?ZRS(cSs)|dks|dkr!t?n|dS(Niii(R(RR((stest_builtin_pyc.pyR?s	(RRR(((stest_builtin_pyc.pyR??stGcBseZRS((RR(((stest_builtin_pyc.pyR??stSequenceWithoutALengthcBseZd?ZRS(cSs|dkrt?n|SdS(Ni(R(RR((stest_builtin_pyc.pyR?s	(RRR(((stest_builtin_pyc.pyR??siR?cBseZd?ZRS(cSs|dkrt?n|SdS(Ni(R,(RR((stest_builtin_pyc.pyR?s	(RRR(((stest_builtin_pyc.pyR??s(iii(iii(ii(ii(ii(iiii(((i@((
R1tzipR)R+R7txrangeR?t	enumerateR?R,(RR.RgRvR?R?R?R?((stest_builtin_pyc.pyttest_zip?s*cs??jtdd?d?d?}d?}?fd?}||??||???fd?}|d"?|d
?|d?|d?|d
?|d?|t?|d?dd#d??Y}?jtt|?d??jttt?d??jttt?t??t?jd?}?j|jd???jtt?jd??jtt?jt???jtt?jd??fd?}ddddg}dd$d??Y}	x!|D]}
||	?|
t	?q?Wdd%d??Y}dtfd??Y}xGt||gD]6}
x-|D]%}
||
?|
t
|
?dk?q(WqWdtfd??Y}?jtd|d ??d!?dS(&NiR'R?cSs~dtfd??Y}d|fd??Y}dtfd??Y}d|fd??Y}d	|fd
??Y}||||fS(NRacBseZd?Zd?ZRS(cSs
||_dS(N(R;(RR;((stest_builtin_pyc.pyR?scSst|j?|S(N(RR;(Rtformat_spec((stest_builtin_pyc.pyt
__format__?s(RRRR?(((stest_builtin_pyc.pyRa?s	tDerivedFromAcBseZRS((RR(((stest_builtin_pyc.pyR??stSimplecBseZRS((RR(((stest_builtin_pyc.pyR??stDerivedFromSimplecBseZd?Zd?ZRS(cSs
||_dS(N(R;(RR;((stest_builtin_pyc.pyR?scSst|j?|S(N(RR;(RR?((stest_builtin_pyc.pyR?s(RRRR?(((stest_builtin_pyc.pyR??s	tDerivedFromSimple2cBseZRS((RR(((stest_builtin_pyc.pyR?s(R8(RaR?R?R?R?((stest_builtin_pyc.pytclasses_new?scSsxddd??Y}d|fd??Y}ddd??Y}d|fd??Y}d	|fd
??Y}||||fS(
NRacBseZd?Zd?ZRS(cSs
||_dS(N(R;(RR;((stest_builtin_pyc.pyRscSst|j?|S(N(RR;(RR?((stest_builtin_pyc.pyR?
s(RRRR?(((stest_builtin_pyc.pyRas	R?cBseZRS((RR(((stest_builtin_pyc.pyR?sR?cBseZRS((RR(((stest_builtin_pyc.pyR?sR?cBseZd?Zd?ZRS(cSs
||_dS(N(R;(RR;((stest_builtin_pyc.pyRscSst|j?|S(N(RR;(RR?((stest_builtin_pyc.pyR?s(RRRR?(((stest_builtin_pyc.pyR?s	R?cBseZRS((RR(((stest_builtin_pyc.pyR?s((((RaR?R?R?R?((stest_builtin_pyc.pytclasses_classicscs??jt|d?d?d??jt|d?d?d??jt|d?d?d??jt|d	?d
?d?dS(Nitspect3specit4speciRt5abci
tabcdeft10abcdef(R1tformat(RaR?R?R?(R(stest_builtin_pyc.pyt
class_tests
cs??jt|d?t|???jt|?t|??dS(NR'(R1R?R(R?(R(stest_builtin_pyc.pytempty_format_spec"sii
g??g?]]^??Ug?]]^???g?;?q7r*g?;?q7r?tBadFormatResultcBseZd?ZRS(cSsdS(Ng??((RR?((stest_builtin_pyc.pyR?5s(RRR?(((stest_builtin_pyc.pyR?4sisR@RCROR_RcRhRoR?R?R?R?R?R?R?R@RRRRRARtDeprecationWarningR?R?R?R?R?R?R?RRRRRRRR(R2R5R9R=RCRGRHRKRURfRiRlRoRwtplatformtsystemR?tmachinetlinux_alphaRutsystem_round_bugtunittesttskipIfRzR{R~R?R?tstaticmethodR?R?R8R?R?R?R?R?R?(((stest_builtin_pyc.pyR @s?							)						>			K



	+	K	$												J	"	.					
	A	l	9	#			Q
					
	+	?		t
TestSortedcBs#eZd?Zd?Zd?ZRS(cCstd?}|}tj|?|j|t|??|j||?|j?tj|?|j|t|dd???|j||?tj|?|j|t|dd???|j||?tj|?|j|t|dd??|j||?dS(NidRecSs
t||?S(N(Re(R;RP((stest_builtin_pyc.pyRQ?sR?cSs|S(N((R;((stest_builtin_pyc.pyRQ?streversei(R?R*tshuffleR1R.RR?(RR1tcopy((stest_builtin_pyc.pyt
test_basic~s




cCs?d}ttg}tr+|jdt?nx0|D](}|jt|?t||???q2Wdjtj	|?j
??}tttttj	g}tr?|jdt?nx0|D](}|jt|?t||???q?WdS(NtabracadabraiR'(
R?R?RtinsertRR1R.tjoinR?tfromkeysR?R?t	frozenset(RR	R?tT((stest_builtin_pyc.pyttest_inputtypes?s
&
cCs,dj?}|jtt|dd??dS(Ns,The quick Brown fox Jumped over The lazy DogcSsdS(Ni((R;RP((stest_builtin_pyc.pyRQ?s(tsplitR)R+R.R7(RR1((stest_builtin_pyc.pyttest_baddecorator?s(RRR?R?R?(((stest_builtin_pyc.pyR?|s		cGs9tdtfdtfdtf??t|?WdQXdS(Ns.+ not supported in 3.xs.+ is renamed to imp.reloadsclassic int division(RR?R(RD((stest_builtin_pyc.pyt
_run_unittest?s
		cCs?ttf}t|?|r?ttd?r?ddl}dgd}x>tt|??D]*}t|?|j	?tj
?||s.40??????B'