config root man

Current Path : /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 : //usr/local/lib/python2.5/test/test_random.pyc

hRc@s>ddkZddkZddkZddkZddkZddklZlZlZl	Z	ddk
lZdeifdYZ
de
fdYZde
fd	YZd
e
fdYZdZeddZdeifdYZdeifdYZddZedjoedendS(iN(tlogtexptsqrttpi(ttest_supporttTestBasicOpscBskeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(cCs.g}t|D]}||iiq~S(s0Helper function to make a list of random numbers(txrangetgentrandom(tselftnt_[1]ti((s,/usr/local/lib/python2.5/test/test_random.pyt
randomlistscCsY|ii|ii}tid|ii|ii}|i||dS(Ng?(RtseedtgetstatettimetsleeptassertNotEqual(R	tstate1tstate2((s,/usr/local/lib/python2.5/test/test_random.pyt
test_autoseeds


cCs^d}|ii|ii}|i|}|ii||i||i|dS(Ni(RRRR
tsetstatetassertEqual(R	tNtstatetrandseq((s,/usr/local/lib/python2.5/test/test_random.pyttest_saverestores
cCsxKdddddddddd	ddtdg
D]}|ii|q4Wx<td
tddgD]}|it|ii|qjW|it|iidd|itt|igdS(Nililili
igQ	@y@tatabcitoneil Fx:^Vl Fx:^Vl Fx:^Vy?@(	tNonettupleRRtrangetdicttassertRaisest	TypeErrorttype(R	targ((s,/usr/local/lib/python2.5/test/test_random.pyt
test_seedargs$scCs|ii|ii}|iid|ii}|i|||iid|ii}|i|||it|ii|it|iid|it|iid|it|iidddS(Nidtickgffffff@ii(RRRt	jumpaheadRR#R$(R	RRtstate3((s,/usr/local/lib/python2.5/test/test_random.pyttest_jumpahead-s
cCsd}t|}x~t|dD]l}|ii||}|it||t|}|it|||i|t|jq#W|i|iigdgdS(Nidii(RRtsampleRtlentsett
failUnless(R	Rt
populationtktstuniq((s,/usr/local/lib/python2.5/test/test_random.pyttest_sample<sc	Csd}t|}d}d}xt|D]~}|||||}h}xUt|D]=}d|t|ii||<t||joPqaqaW|iq.WdS(Nii'cSsttitd|dS(Ni(treducetintt__mul__R(R
((s,/usr/local/lib/python2.5/test/test_random.pyt	factorialOs(R!RRR RR,R-tfail(	R	R
tpopttrialsR8R1texpectedtpermsR((s,/usr/local/lib/python2.5/test/test_random.pyttest_sample_distributionIs	

	cCs|iittdd|iitdd|iitdd|iitdd|iitdddS(Niitabcdefghijklmnopqrst(RR,R.R!RtstrR (R	((s,/usr/local/lib/python2.5/test/test_random.pyttest_sample_inputs[s
cCs|iitiddtitdtdddtdd}|ii|dd}tdt|D}xWt|d	D]E}|ii||}x'|D]}|it|tjqWqW|i	|i
|t|dS(
NR?ii
idiniicss(x!|]}|t||fVqWdS(N(tcomplex(t.0R((s,/usr/local/lib/python2.5/test/test_random.pys	<genexpr>ns	i(RR,R"tfromkeysR!Rtassert_R%R6tsortR(R	RRtdR1tsamptx((s,/usr/local/lib/python2.5/test/test_random.pyttest_sample_on_dictscs2!
cCsxd	D]}|ii||ii}|iidd}|ii||ii}|iidd}|i|||i||qWdS(
Niii{ii90i@i	i(iii{ii90i@i	(RRRtgaussR(R	Rtx1ty1tx2ty2((s,/usr/local/lib/python2.5/test/test_random.pyt
test_gausswscCsti|i}g}tdD]}||iiq#~}ti|}g}tdD]}||iqb~}|i||dS(Ni
(tpickletdumpsRRRtloadsR(R	RRRtorigseqtnewgent_[2]trestoredseq((s,/usr/local/lib/python2.5/test/test_random.pyt
test_picklings
0-(
t__name__t
__module__R
RRR'R+R4R>RARJRPRX(((s,/usr/local/lib/python2.5/test/test_random.pyRs							
				tWichmannHill_TestBasicOpscBs8eZeiZdZdZdZdZRS(cCs|it|iiddS(Ni(iNN(R#t
ValueErrorRRR(R	((s,/usr/local/lib/python2.5/test/test_random.pyttest_setstate_first_argscCsd}|ii}|ii||ii}|ii|x!t|D]}|iiqQW|ii}|i||dS(Ni(RRR)RRRR(R	RR2tr1Rtr2((s,/usr/local/lib/python2.5/test/test_random.pyttest_strong_jumpaheads
cCsxd	D]}|ii||ii}|iidd}|ii||ii}|iidd}|i|||i||qWdS(
Niii{ii90i@i	i(iii{ii90i@i	(RtwhseedRRKR(R	RRLRMRNRO((s,/usr/local/lib/python2.5/test/test_random.pyttest_gauss_with_whseedscCsAti}tidd|it|iid|ti(dS(NterrorsUnderlying randomii<I(twarningstfilterstfilterwarningsR#tUserWarningRt	randrange(R	t
oldfilters((s,/usr/local/lib/python2.5/test/test_random.pyttest_bigrands
(	RYRZRtWichmannHillRR]R`RbRj(((s,/usr/local/lib/python2.5/test/test_random.pyR[s
		
	tSystemRandom_TestBasicOpscBseZeiZdZdZdZdZdZ	dZ
dZdZdZ
d	Zd
ZeedZRS(cCs|iidS(N(RR(R	((s,/usr/local/lib/python2.5/test/test_random.pyRscCs3|it|ii|it|iiddS(N(R#tNotImplementedErrorRRRR(R	((s,/usr/local/lib/python2.5/test/test_random.pyRscCs|iiddS(Nid(RR(R	((s,/usr/local/lib/python2.5/test/test_random.pyR'scCs|iiddS(Nid(RR)(R	((s,/usr/local/lib/python2.5/test/test_random.pyR+scCs6d|i_|iid|i|iiddS(Nid(RRt
gauss_nextRR(R	((s,/usr/local/lib/python2.5/test/test_random.pyRPscCs|itti|idS(N(R#RmRQRRR(R	((s,/usr/local/lib/python2.5/test/test_random.pyRXscCsXd}d}x1tdD]#}|t|ii|O}qW|i||ddS(Nii5iidiI (RR6RRR(R	tspantcumR((s,/usr/local/lib/python2.5/test/test_random.pyttest_53_bits_per_floats
!cCs{d}d}xTtdD]F}|ii|}|id|jo
|jn||O}qW|i||ddS(Niiiidil" (RRRhRER(R	RoRpRtr((s,/usr/local/lib/python2.5/test/test_random.pyRjs
$c	Csxddddddddd	g	D]~}|iid
|}|iid
|d
}||jodSn|i||ii||jo
|jnq"WdS(Ni(iPiiiiiwii&i(RRhRE(R	Rtstarttstop((s,/usr/local/lib/python2.5/test/test_random.pyttest_bigrand_rangess"
c
Csx~dd	dfddfgD]a\}}|itt||tg}tdD]}||ii||qT~qWdS(Niiii<id(iiIIIIIIII(RR.R!RRRh(R	RsRtRR((s,/usr/local/lib/python2.5/test/test_random.pyttest_rangelimitsscCs[xKtddD]:}|id|ii|jod|jnqW|ii}x}dddddddd	d
ddd
ddgD]K}d}x$tdD]}|||O}qW|i|d|dqW|it|ii|it|iidd|it|iid|it|iid|it|iiddS(Niiiiiiii i4i5i6iwiiiidig333333$@(RRERtgetrandbitsRR#R$R\(R	R1tgetbitsRoRpR((s,/usr/local/lib/python2.5/test/test_random.pyttest_genrandbitss 81
cCsQxJtddD]9}d|>}|d}|d||d}|i|||i|d|dj||d7}|d||d}|i|||dgj|id||jod|djn||d?8}|d||d}|i|||id||jod|djnqWdS(NiilgrZ|
?ii(RRRE(R	t_logR6RR
tnumbitsR1((s,/usr/local/lib/python2.5/test/test_random.pyttest_randbelow_logic	s

0(RYRZRtSystemRandomRRRR'R+RPRXRqRjRuRvRyRR6R|(((s,/usr/local/lib/python2.5/test/test_random.pyRls											tMersenneTwister_TestBasicOpscBseZeiZdZdZdZdZdZ	dZ
dZdZdZ
d	Zeed
ZdZRS(cCs|it|iiddS(Ni(iNN(R#R\RRR(R	((s,/usr/local/lib/python2.5/test/test_random.pyR]"scCs|it|iid|it|iidd	df|it|iidd
ddf|it|iidddddfdS(
NiiiRiqiip(iNN(iii(R(i(R(R#R$RRRR\(R	((s,/usr/local/lib/python2.5/test/test_random.pyttest_setstate_middle_arg%s"&c
Csddddddddd	d
g
}|iidddd|idd}x3t||D]"\}}|i||ddqcWdS(Ng>FdV?gwR1ۉ?gQ"?g~5?gmb?gYKbX?gH,r̊?gV8?gOֶ?g4Ԗ?l#qlGai lfi@l$i`iitplacesill`&l'R(RRR
tziptassertAlmostEqual(R	R<tactualRte((s,/usr/local/lib/python2.5/test/test_random.pyttest_referenceImplementation/s	cCsddkl}ddddddd	d
ddg
}|iid
ddd|idd}x<t||D]+\}}|it||d|qsWdS(Ni(tldexpl#1,ulwbl'lJXluak~[l@"p1ylsV%bX$lE3EJlVblaoekl4)[vl#qlGai lfi@l$i`iii5ll`&l'R(tmathRRRR
RRtlong(R	RR<RRR((s,/usr/local/lib/python2.5/test/test_random.pyt$test_strong_reference_implementationNs 	cCs"dd>d}|ii|dS(Nli'iii8(RR(R	R((s,/usr/local/lib/python2.5/test/test_random.pyttest_long_seeddscCsXd}d}x1tdD]#}|t|ii|O}qW|i||ddS(Nii5iidiI (RR6RRR(R	RoRpR((s,/usr/local/lib/python2.5/test/test_random.pyRqms
!cCs{d}d}xTtdD]F}|ii|}|id|jo
|jn||O}qW|i||ddS(Niiiidil" (RRRhRER(R	RoRpRRr((s,/usr/local/lib/python2.5/test/test_random.pyRjus
$c	Csxddddddddd	g	D]~}|iid
|}|iid
|d
}||jodSn|i||ii||jo
|jnq"WdS(Ni(iPiiiiiwii&i(RRhRE(R	RRsRt((s,/usr/local/lib/python2.5/test/test_random.pyRus"
c
Csx~dd	dfddfgD]a\}}|itt||tg}tdD]}||ii||qT~qWdS(Niiii<id(iiIIIIIIII(RR.R!RRRh(R	RsRtRR((s,/usr/local/lib/python2.5/test/test_random.pyRvscCs|iid|i|iiddxKtddD]:}|id|ii|jod|jnq<W|ii}x}dddd	d
dddd
dddddgD]K}d}x$tdD]}|||O}qW|i|d|dqW|it|ii|it|iid|it|iidd|it|iid|it|iiddS(NiidlS!m.vFXOiiiiiiii i4i5i6iwiiiRi(	RRRRwRRER#R$R\(R	R1RxRoRpR((s,/usr/local/lib/python2.5/test/test_random.pyRys&81
cCsQxJtddD]9}d|>}|d}|d||d}|i|||i|d|dj||d7}|d||d}|i|||dgj|id||jod|djn||d?8}|d||d}|i|||id||jod|djnqWdS(NiilgrZ|
?ii(RRRE(R	RzR6RR
R{R1((s,/usr/local/lib/python2.5/test/test_random.pyR|s

0cCsjd}d}d}|ii|||}|i||jo
|jn|i|||ddS(NIl Fx:^Vi8i(RRhRER(R	RsRttstepRI((s,/usr/local/lib/python2.5/test/test_random.pyttest_randrange_bug_1590891s$(RYRZRtRandomRR]RRRRRqRjRuRvRyRR6R|R(((s,/usr/local/lib/python2.5/test/test_random.pyR~s		
									g
?g
ö)$@g&Ԏg
ta@gQfg>@~)@gA~g~\>giE>icCs|d8}|d}x3tdt|D]}|||||7}q*W|d7}|||t||tdt|S(Ng?iig?i(RR-RRR(tztcoftgtsumR((s,/usr/local/lib/python2.5/test/test_random.pytgammas


tTestDistributionscBseZdZdZRS(cCsti}g}tdD]}||iq~dgd}|i|_|idd|i|_|id|i|_|id|i|_|idd|i|_|idd|i|_|i	dd|i|_|i
dd|i|_|idd|i|_|idd|i|_|idd|i|_|idd|i|_|i
d	d	dS(
Ni2giii
g?g{Gz?gi@g@(RRRR:tuniformt
paretovariatetexpovariatetweibullvariatet
normalvariateRKtlognormvariatetvonmisesvariatetgammavariatetbetavariate(R	RRRRI((s,/usr/local/lib/python2.5/test/test_random.pyttest_zeroinputss48













c
Csti}d}g}td|D]}||t|q&~}x|idddddf|idddddf|iddddddf|idtddd	tddd	tddd	dfgD]\}}}}	|i	|_g}
xGtt
|D]3}y|
i||Wqtj
oqXqWd
}}x*|
D]"}
||
7}||
|d7}qcWt
|
}|i
|||d|i
||d|	dqWdS(Niig?g$@iig?g@g@i(g?g$@g&@g"@g@T@(g?g@(g@g@g@g0@g@(g?g@(RRRtfloatRRRRRR:R-tappendt
IndexErrorR(R	RRRRRItvariatetargstmut	sigmasqrdtyts1ts2R((s,/usr/local/lib/python2.5/test/test_random.pyttest_avg_stds64.
	

(RYRZRR(((s,/usr/local/lib/python2.5/test/test_random.pyRs	t
TestModulecBs#eZdZdZdZRS(cCsP|itid|itid|itid|itiddS(Ng3?r?g.DT!@g9B.?gtY@(RRt
NV_MAGICCONSTtTWOPItLOG4t
SG_MAGICCONST(R	((s,/usr/local/lib/python2.5/test/test_random.pyttestMagicConstantsscCs,|ittitttjdS(N(R/R.Rt__all__tdir(R	((s,/usr/local/lib/python2.5/test/test_random.pyttest__all__scCs*dtifdY}|dddS(NtSubclasscBseZddZRS(cSstii|dS(N(RRt__init__(R	tnewarg((s,/usr/local/lib/python2.5/test/test_random.pyR
sN(RYRZRR(((s,/usr/local/lib/python2.5/test/test_random.pyR	sRi(RR(R	R((s,/usr/local/lib/python2.5/test/test_random.pyt test_random_subclass_with_kwargss(RYRZRRR(((s,/usr/local/lib/python2.5/test/test_random.pyRs		cCsttttg}ytiiWntj
onX|itt	i
|ddk}|o`t|doPdgd}x7tt|D]#}t	i
||i||<qW|GHndS(Nitgettotalrefcounti(R[R~RRRR}RmRRlRtrun_unittesttsysthasattrRRR-R(tverbosettestclassesRtcountsR((s,/usr/local/lib/python2.5/test/test_random.pyt	test_mains$	



t__main__R(	g
?g
ö)$@g&Ԏg
ta@gQfg>@~)@gA~g~\>giE>(tunittestRRRQRdRRRRRttestRtTestCaseRR[RlR~t_gammacoeffRRRRRRYtTrue(((s,/usr/local/lib/python2.5/test/test_random.pys<module>s&"+e.


Man Man