config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/test/test_long.pyo

³ò
h”Rc@sCddkZddklZddkZdefd„ƒYZdZdeZedZdZ	dZ
eed	ddeed?gƒZ
e
id
ƒe
idƒdZx3edeƒD]!Ze
iedƒed>Zq·W[e
ed
„e
ƒed„e
ƒZ
deifd„ƒYZd„ZedjoeƒndS(iÿÿÿÿN(ttest_supporttFrmcBseZd„Zd„ZRS(cGs||_||_dS(N(tformattargs(tselfRR((s*/usr/local/lib/python2.5/test/test_long.pyt__init__s	cCs|i|iS(N(RR(R((s*/usr/local/lib/python2.5/test/test_long.pyt__str__s(t__name__t
__module__RR(((s*/usr/local/lib/python2.5/test/test_long.pyRs	iiiiFilUUª*UUª*lª*UUª*UU
lcCs|S(((tx((s*/usr/local/lib/python2.5/test/test_long.pyt<lambda>$scCs|S(((R	((s*/usr/local/lib/python2.5/test/test_long.pyR
%stLongTestcBs¡eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„ZRS(cCsD|i|djƒ|t}|td}d}d}ttiƒtdƒdB}x¦||jo˜|d?d}t|||ƒ}|id|jo
tjnƒ||}||>}|d@o|d|>dB}nttiƒtdƒ}qXW|i||jo
|jnƒtiƒdjo|}n|S(Niiligà?(tassert_tSHIFTtinttrandomtmin(Rtndigitstnbits_hitnbits_lotanswertnbitstrtbits((s*/usr/local/lib/python2.5/test/test_long.pytgetran0s(

$

$cCsYd}x.t|ƒD] }|t>tidtƒB}qWtiƒdjo|}n|S(Nligà?(txrangeR
RtrandinttMASK(RRti((s*/usr/local/lib/python2.5/test/test_long.pytgetran2Hs
c
Cs;|i}t||ƒ\}}||||}}||||}}	|||	td||ƒƒ|||td||ƒƒ|||td||ƒƒ|||||td||ƒƒ|djo7|id|jo
|jntd||ƒƒn4|i||jo
djntd||ƒƒdS(Ns-multiplication does not commute for %r and %rs6divmod returns different quotient than / for %r and %rs2divmod returns different mod than %% for %r and %rs'x != q*y + r after divmod on x=%r, y=%ris bad mod from divmod on %r and %r(tassertEqualtdivmodRR(
RR	tyteqtqRtq2tr2tpabtpba((s*/usr/local/lib/python2.5/test/test_long.pytcheck_divisionPs	$
7cCstdtdƒtttdƒ}|itdƒxT|D]L}|i|ƒ}x4|D],}|i|ƒpd}|i||ƒqXWq<WdS(Niiil(tranget	MAXDIGITStKARATSUBA_CUTOFFtappendRR'(RtdigitstlenxR	tlenyR ((s*/usr/local/lib/python2.5/test/test_long.pyt
test_division^sc
Cstddƒtttdƒ}|itdtdgƒg}|D]}||tqF~}x |D]˜}d|>d}x|D]y}||joq‚nd|>d}||}	d||>d|>d|>d}
|i|	|
td|||	|
ƒƒq‚WqgWdS(Niii
idls*bad result for a*b: a=%r, b=%r, x=%r, y=%r(R(R*textendR
RR(RR,t_[1]tdigitRtabitstatbbitstbR	R ((s*/usr/local/lib/python2.5/test/test_long.pyttest_karatsubahs  %

c	CsÅ|i}||d@dtd|ƒƒ||dB|td|ƒƒ||dA|td|ƒƒ||d@|td|ƒƒ||dBdtd|ƒƒ||dA|td|ƒƒ|||td	|ƒƒ|||@|td
|ƒƒ|||B|td|ƒƒ|||Adtd|ƒƒ|||@dtd
|ƒƒ|||Bdtd|ƒƒ|||Adtd|ƒƒ||d|td|ƒƒ|||dtd|ƒƒxütdtƒD]ê}d|}|||>|?|td||fƒƒ|||||?td|||fƒƒ|||||>td|||fƒƒ|||@||?|>td|||fƒƒ|||@||d@td|||fƒƒqÓWdS(Nisx & 0 != 0 for x=%rsx | 0 != x for x=%rsx ^ 0 != x for x=%riÿÿÿÿsx & -1 != x for x=%rsx | -1 != -1 for x=%rsx ^ -1 != ~x for x=%rsx != ~~x for x=%rsx & x != x for x=%rsx | x != x for x=%rsx ^ x != 0 for x=%rsx & ~x != 0 for x=%rsx | ~x != -1 for x=%rsx ^ ~x != -1 for x=%risnot -x == 1 + ~x for x=%rsnot -x == ~(x-1) forx =%rilsx << n >> n != x for x=%r, n=%rs%x // p2 != x >> n for x=%r n=%r p2=%rs$x * p2 != x << n for x=%r n=%r p2=%rs.not x & -p2 == x >> n << n for x=%r n=%r p2=%rs0not x & -p2 == x & ~(p2 - 1) for x=%r n=%r p2=%r(RRRR
(RR	R!tntp2((s*/usr/local/lib/python2.5/test/test_long.pytcheck_bitop_identities_1~s:	
cCs|i}|||@||@td||fƒƒ|||B||Btd||fƒƒ|||A||Atd||fƒƒ|||A|A|td||fƒƒ|||@||Btd||fƒƒ|||B||@td||fƒƒ|||A||B||@@td||fƒƒ|||A||@||@Btd||fƒƒ|||A||B||B@td	||fƒƒdS(
Nsx & y != y & x for x=%r, y=%rsx | y != y | x for x=%r, y=%rsx ^ y != y ^ x for x=%r, y=%rsx ^ y ^ x != y for x=%r, y=%rs"x & y != ~(~x | ~y) for x=%r, y=%rs"x | y != ~(~x & ~y) for x=%r, y=%rs*x ^ y != (x | y) & ~(x & y) for x=%r, y=%rs+x ^ y == (x & ~y) | (~x & y) for x=%r, y=%rs+x ^ y == (x | y) & (~x | ~y) for x=%r, y=%r(RR(RR	R R!((s*/usr/local/lib/python2.5/test/test_long.pytcheck_bitop_identities_2œs	''''**cCs|i}|||@|@|||@@td|||fƒƒ|||B|B|||BBtd|||fƒƒ|||A|A|||AAtd|||fƒƒ||||B@||@||@Btd|||fƒƒ||||@B||B||B@td|||fƒƒdS(Ns/(x & y) & z != x & (y & z) for x=%r, y=%r, z=%rs/(x | y) | z != x | (y | z) for x=%r, y=%r, z=%rs/(x ^ y) ^ z != x ^ (y ^ z) for x=%r, y=%r, z=%rs5x & (y | z) != (x & y) | (x & z) for x=%r, y=%r, z=%rs5x | (y & z) != (x | y) & (x | z) for x=%r, y=%r, z=%r(RR(RR	R tzR!((s*/usr/local/lib/python2.5/test/test_long.pytcheck_bitop_identities_3«s	c
Cs¶xtD]}|i|ƒqWtdtdƒ}x~|D]v}|i|ƒ}|i|ƒxQ|D]I}|i|ƒ}|i||ƒ|i|||i||dƒƒqaWq8WdS(Nii(tspecialR:RR)RR;R=(RR	R,R-R.R ((s*/usr/local/lib/python2.5/test/test_long.pyttest_bitop_identities¸s
cCsß||fd
jodSng}d}|djod|}}nx4|o,t||ƒ\}}|it|ƒƒqIW|iƒ|pdg}d| hdd<dd<d	d
<|ditd„|ƒƒdS(Niit0Lit-t0ti
t0xicSsd|S(t0123456789abcdef((R((s*/usr/local/lib/python2.5/test/test_long.pyR
ÓstL(ii(RR+Rtreversetjointmap(RR	tbaseR,tsignR((s*/usr/local/lib/python2.5/test/test_long.pytslow_formatÄs

c	Csúx£dtfdtfdtffD]€\}}||ƒ}|i||ƒ}td|i|||ƒ}|i|||ƒ|it|dƒ|td||ƒƒq"Wt|ƒ}|i|dƒd }td|i|||ƒ}|i|||ƒdS(Nii
is%%s returned %r but expected %r for %rislong("%s", 0) != %riÿÿÿÿ(	tocttreprthexRLRRRtlongtstr(RR	RJtmappertgottexpectedtmsg((s*/usr/local/lib/python2.5/test/test_long.pytcheck_format_1Õs",cCssxtD]}|i|ƒqWxNtdƒD]@}x7tdtdƒD]"}|i|ƒ}|i|ƒqEWq+WdS(Ni
i(R>RVRR)R(RR	RR-((s*/usr/local/lib/python2.5/test/test_long.pyttest_formatås
cCsŠddk}|i}|d}t|ƒ}t|ƒ}|i||dƒ|i||dƒt|ƒ}y|i||dƒWn tj
o|idƒnXt|tƒptdƒ‚nt|ƒ}y|i||dƒWn tj
o|id	ƒnXt|tƒptd
ƒ‚n|d}yt|ƒ}Wn tj
o|idƒnX|i	t|tƒdƒ|d}yt|ƒ}Wn tj
o|id
ƒnX|i	t|tƒdƒdtfd„ƒY}|dƒ}t|ƒ}|i	t
|ƒtjdƒdtfd„ƒY}	|i|	ƒdd!dƒ|	ƒdd!\}
}|i|	ƒ|
|!|
|fƒdS( Niÿÿÿÿislong(sys.maxint) != sys.maxints$long(-sys.maxint-1) != -sys.maxint-1s3converting sys.maxint to long and back to int failss!int(long(sys.maxint)) overflowed!s.int(long(sys.maxint)) should have returned ints6converting -sys.maxint-1 to long and back to int failss$int(long(-sys.maxint-1)) overflowed!s1int(long(-sys.maxint-1)) should have returned ints*int(long(sys.maxint) + 1) mustn't overflows3int(long(sys.maxint) + 1) should have returned longs-int(long(-sys.maxint-1) - 1) mustn't overflows6int(long(-sys.maxint-1) - 1) should have returned longtlong2cBseZRS((RR(((s*/usr/local/lib/python2.5/test/test_long.pyRXslids<overflowing int conversion must return long not long subtypetXcBseZd„ZRS(cSs
||fS(N((RRtj((s*/usr/local/lib/python2.5/test/test_long.pyt__getslice__%s(RRR[(((s*/usr/local/lib/python2.5/test/test_long.pyRY$slÿÿÿÿliûÿÿÿill(iûÿÿÿillùÿÿÿl(tsystmaxintRPRRt
OverflowErrortfailt
isinstancet
TestFailedRttypetobject(RR\thugeposthugenegthugepos_aslongthugeneg_aslongR	R RXRYtslicemintslicemax((s*/usr/local/lib/python2.5/test/test_long.pyt	test_miscís^	

c
sæddk}ddk}dddd|id|i|idg}t|i|iƒƒ}|i|d||dgƒ|ig}|D]}||q‹~ƒ‡‡‡fd†}x'|D]}t|ƒ}	|	‰|‰|d|ƒxï|D]ç}
t|
ƒ}|	|‰||
‰||d|
ƒ|	|‰||
‰||d|
ƒ|	|‰||
‰||d	|
ƒ|
oz|	|‰||
‰||d
|
ƒ|	|‰||
‰||d|
ƒt|	|ƒ‰t|	|ƒ‰||d|
ƒnt|
ƒd
joÕ|djo
|
djoº|	|‰||
‰||d|
ƒx“|D]‡}|djot|
djoDt	|	|t|ƒƒ‰t	||
|ƒ‰|d||
d|ƒqÒˆi
tt	|	|t|ƒƒqKqKWqóqóWq¿WdS(Niÿÿÿÿiiiics&ˆiˆˆtd|ˆˆƒƒdS(Nsfor %r expected %r got %r(RR(R(RTRSR(s*/usr/local/lib/python2.5/test/test_long.pytcheckit8sRAt+t*t/s//Ris**tpowt%(tmathR\R]RtsqrtR0RPRtabsRotassertRaisest	TypeError(
RRqR\R>RrR1RRkR	tlongxR tlongyR<((RRSRTs*/usr/local/lib/python2.5/test/test_long.pyttest_auto_overflow0s\,)










.



c)Cs6ddk}x*d6D]"}|itt|ƒƒ|ƒqWdd}d7}|}h|d<|d<|d
<|d<}xµdddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4g&D];}|itt||ƒ|it|ƒt|ƒd5ƒqóWdS(8NiÿÿÿÿgÀgð¿ggð?g@t12345ixli0uthugetmhugetshugeRqsfloat(huge)sfloat(mhuge)s
complex(huge)scomplex(mhuge)scomplex(huge, 1)scomplex(mhuge, 1)scomplex(1, huge)scomplex(1, mhuge)s	1. + huges	huge + 1.s
1. + mhuges
mhuge + 1.s	1. - huges	huge - 1.s
1. - mhuges
mhuge - 1.s	1. * huges	huge * 1.s
1. * mhuges
mhuge * 1.s
1. // huges
huge // 1.s1. // mhugesmhuge // 1.s	1. / huges	huge / 1.s
1. / mhuges
mhuge / 1.s
1. ** huges
huge ** 1.s1. ** mhugesmhuge ** 1.smath.sin(huge)smath.sin(mhuge)smath.sqrt(huge)smath.sqrt(mhuge)smath.floor(huge)smath.floor(mhuge)s(float(shuge) should not equal int(shuge)(gÀgð¿ggð?g@lÑ(	RqRtfloatRPRtR^tevaltassertNotEqualR(RRqR	R|RzR{t	namespacettest((s*/usr/local/lib/python2.5/test/test_long.pyttest_float_overflowns2 
*	
c	CsÕddk}|i|iƒ}xstdƒdddgD]X}d|}|i|ƒ}|i||ƒ||}|i|ƒ}|i||ƒq8Wx:dD]2}|it|i|ƒ|it|i|ƒq›WdS(Niÿÿÿÿi
idièi'llÿÿÿÿll›leýÿÿ(leýÿÿlÿÿÿÿl(Rqtlog10teR(tassertAlmostEqualtlogRtt
ValueError(	RRqtLOG10EtexptvalueRƒRTR†tbad((s*/usr/local/lib/python2.5/test/test_long.pyt	test_logss

csÈ|i}ddk‰ddk}dd‡‡fd†ƒY‰dddddd	d
g}xfddd fD]U}|i|d|d||d|dt|dƒt|ƒt|dƒgƒqhW|iddd|it|iƒgƒtd
ƒ}|idddd!|d||dgƒ|ig}|D]}||q0~ƒxy|D]q}ˆ|ƒ}x\|D]T}ˆ|ƒ}	t||	ƒ}
t||ƒ}||
|td|||
|ƒƒ|||j|
djtd|||
ƒƒ|||j|
djtd|||
ƒƒ|||j|
djtd|||
ƒƒ|||j|
djtd|||
ƒƒ|||j|
djtd|||
ƒƒ|||j|
djtd|||
ƒƒqhWqOWdS("NiÿÿÿÿtRatcs&eZ‡fd†Z‡fd†ZRS(c	s&t|ttfƒo||_d|_n÷t|tƒoÖˆit|ƒƒ\}}d}d}xL|oDˆi||ƒ}t|ƒ}||>|B}||8}||8}qfW|djo||>}d}n|}d|>}|djo|}n||_||_nt	dt
ƒ‚dS(Niiiscan't deal with %r(R`RRPR8tdR}tfrexpRstldexpRutval(	RRŠtfR„tCHUNKttopR2R8RŽ(Rq(s*/usr/local/lib/python2.5/test/test_long.pyR¬s2	





		csAt|ˆƒpˆ|ƒ}nt|i|i|i|iƒS(N(R`tcmpR8RŽ(Rtother(R(s*/usr/local/lib/python2.5/test/test_long.pyt__cmp__Ôs(RRRR—((RRq(s*/usr/local/lib/python2.5/test/test_long.pyR«s(igü©ñÒMbP?g®Gáz®ï?gð?gø?g@Œµx¯DgZb××çtig@i0i2i5g333333Ó?iillli Ns%r %r %d %ds%r == %r %ds%r != %r %ds
%r < %r %ds%r <= %r %ds
%r > %r %ds%r >= %r %d(gðBgCg@Cl6 (	RRqR\R0RPR]R}R•R(RR!R\tcasesttR1R	tRxR tRytRcmptxycmp((RRqs*/usr/local/lib/python2.5/test/test_long.pyttest_mixed_compares¡s8	.%.(*)"+++++(RRRRR'R/R7R:R;R=R?RLRVRWRjRxR‚RŒRž(((s*/usr/local/lib/python2.5/test/test_long.pyR(s"				
				
					C	>		cCstitƒdS(N(Rtrun_unittestR(((s*/usr/local/lib/python2.5/test/test_long.pyt	test_mainóst__main__(tunittestRRRRcRR
tBASERR*R)RIRPR>R+R9R(RtTestCaseRR R(((s*/usr/local/lib/python2.5/test/test_long.pys<module>s0	

"

ÿÌ	


Man Man