config root man

Current Path : /usr/local/lib/python2.5/bsddb/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/bsddb/test/test_basics.pyo

hRc@sdZddkZddkZddkZddkZddkZddkZddklZddkZddk	Z	yddk
lZWn#ej
oddk
lZnXddklZdZdeifdYZd	eifd
YZdefdYZd
efdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefdYZdefd YZd!efd"YZd#efd$YZ d%e fd&YZ!d'e fd(YZ"d)e fd*YZ#d+e fd,YZ$d-efd.YZ%d/e%fd0YZ&d1e%fd2YZ'd3Z(e)d4joei*d5d6ndS(7s_
Basic TestCases for BTree and hash DBs, with and without a DBEnv, with
various DB flags, etc.
iN(tpprint(tdb(tverboset-tVersionTestCasecBseZdZRS(cCsEti}to.dGddGHd|fGHtiGHddGHndS(Ns
s-=isbsddb.db.version(): %s(RtversionRtDB_VERSION_STRING(tselftinfo((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest00_versions

(t__name__t
__module__R	(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRst
BasicTestCasecBseZeiZdZdZdZdZ	dZ
dZdZdZ
dZdZddZdZdZdZddd	Zd
ZdZdZd
ZdZdZRS(iiicCs(|io[tiitiitidd}||_yti	|Wn8t
j
o,}|ititi
fjoqnXti|yti|_|iid	|iid|iitti|ii|id|ii||itiB|t_tiitid|_ dt_Wq}ti	|q}Xnd|_ti|_ ti"|i|_#|i#i|i$|i%o6|i#i|i |i%|i&|i'tiB|i(n6|i#i|i d|i(d|i&d|i'tiB|i)dS(
Nitdb_homeiiitmodetdbtypetflagsi(*tuseEnvtostpathtjointdirnametsystargvthomeDirtshutiltrmtreetOSErrorterrnotENOENTtESRCHtmkdirRtDBEnvtenvt
set_lg_maxt
set_tx_maxtset_tx_timestamptintttimet	set_flagstenvsetflagstopentenvflagst	DB_CREATEttempfilettempdirtsplittmktemptfilenametNonetDBtdt
dbsetflagstdbnameRtdbopenflagstdbmodet
populateDB(RRte((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pytsetUp7sD
(	
	

	
		cCsR|ii|idj	o!|iiti|inti|i	dS(N(
R3tcloseR!R1RRRRtremoveR0(R((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttearDownbs


cCs|i}xNt|idD]9}d|i|}|i|}|i|||qW|idd|xKt|iddD]2}d|}|i|}|i|||qW|o|int|}to
d|GHndS(Nis%04dsempty valuetiscreated %d records(R3tranget_numKeystmakeDatatputtcommittlenR(Rt_txnR3txtkeytdatatnum((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR8rs"	
cCsti|gdS(Ni(tDASHR(RRG((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRAsc
CsK|i}to dGddGHd|iiGHnx<ddddd	gD]%}|i|}to	|GHqFqFWy|id
Wn(tij
o}to	|GHqnX|id|i	d
d|i	d
d
|i
ti@ony|i	d
ddtiWn(ti
j
o}to	|GHqBnX|id|i
ti@on|i|i~ti|i|_|io|ii|i|in|ii|i|i}|i
ti@on|idd}to	|GHn|idd}|id|}|i}todGHt|ndS(Ns
s-=is Running %s.test01_GetsAndPuts...t0001t0100t0400t0700t0999tabcdsexpected exceptionsa new recordssame keysthis should failRt0555s0555-0555-0555-0555-0555sbad keysbad datas"d.stat() returned this dictionary:(R3Rt	__class__R
tgettdeleteRtDBNotFoundErrortfailRBR4tDB_DUPtDB_NOOVERWRITEtDBKeyExistErrortsyncR;R2R!R5R)R0tget_bothtstatR(RR3RGRHtvaltrects((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest01_GetsAndPutss\	

	




		cCs|i}to dGddGHd|iiGHnx7ddddd	gD] }||}to	|GHqFqFW|i}d
|d<|i}d|d<|i}tod
GHt|d n|i}todGHt|d n|i}todGHt|d ndS(Ns
s-=is&Running %s.test02_DictionaryMethods...t0002t0101t0401t0701t0998sa new records
new recordsa replacement recordsthe first 10 keys are:i
sthe first 10 items are:sthe first 10 values are:(R3RRRR
tkeysRtitemstvalues(RR3RGRHRfRgRh((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest02_DictionaryMethodss4	




cCsto)dGddGHd|ii||fGHn|io$|iti@o|ii}nd}|i	i
d|}|i}d}x|dj	o|d}to|ddjo	|GHny|i}Wqti
j
o7}|oto	|GHnd}q|id	qXqW|i}d}x|dj	o|d}to|ddjo	|GHny|i}Wq9ti
j
o7}|oto	|GHnd}q|id	q9Xq9W|id
}|i}|id}y|id}	Wn(ti
j
o}to	|GHqtn?X|o|id
n|	djo|id|	fn|id|id}y|idd}	Wn(ti
j
o}to	|GHq
n?X|o|id
n|	djo|id|	fn|i	itijo|id}to
dG|GHn|iddddd}to
dG|GHn|ddjo|idn|id}
to
dG|
GHn|
ddjo|idqn|id|iy|i}Wn@tij
o1}|oto	|GHqHqe|idnX|o|idn|i|iti}|iddti|iddtidddd|i|i|o|inhd-d <d.d!<tifd"<d/d#<d0d$<d1d%<d2d&<d3d'<dd(tifd)<d4d*<}x|i D]v\}
}y.to
d+|
GHnt!t"||
|Wn(ti#j
o}to	|GHqqaX|id,|
qaW|i	i
d|}|i	i~dS(5Ns
s-=isCRunning %s.test03_SimpleCursorStuff (get_error %s, set_error %s)...ttxniiidsunexpected DBNotFoundErrort0505sempty valuesbad keysexpected exceptionsexpected None: %rt0404sbad datat011ssearched for '011', found: tdlentdoffs%searched (partial) for '011', found: R>sexpected empty data portions!search for 'empty value' returnedsempty value lookup failedt0499sunexpected DBKeyEmptyErrors"DBKeyEmptyError exception expectedsa new valueteritcurrentRTtduptfirstRStnexttprevtlasttspamRBtsets-attempting to use a closed cursor's %s methods8no exception raised when using a buggy cursor's%s method((((i((((Rk($RRRR
R!R6RtDB_AUTO_COMMITt	txn_beginR1R3tcursorRtRuRURVRwRvRyRrR[RAtget_typetDB_BTREEt	set_rangeRTtDBKeyEmptyErrorRstDB_POSITIONRBt
DB_CURRENTR;RCRgtapplytgetattrtDBError(Rtget_raises_errortset_raises_errorRjtcR^tcountR]trec2tntevtc2tmethods_to_testtmethodtargst	oldcursor((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest03_SimpleCursorStuff(s


		


		









"

							

	
cCsSto dGddGHd|iiGHn|iid}|idddddS(	Ns
s-=is<Running %s.test03b_SimpleCursorStuffWithoutGetReturnsNone...iRiR(RRRR
R3tset_get_returns_noneR(Rtold((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyt*test03b_SimpleCursorWithoutGetReturnsNone0s
cCsSto dGddGHd|iiGHn|iid}|idddddS(	Ns
s-=is<Running %s.test03b_SimpleCursorStuffWithoutGetReturnsNone...iRiR(RRRR
R3RR(RR((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyt'test03b_SimpleCursorWithGetReturnsNone1s
cCseto dGddGHd|iiGHn|iid}|iid}|iddd	ddS(
Ns
s-=is<Running %s.test03c_SimpleCursorStuffWithoutSetReturnsNone...iiRiR(RRRR
R3RR(RR((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyt#test03c_SimpleCursorGetReturnsNone2s
cCs|i}to dGddGHd|iiGHnd}dddd}|i|||id	dd
d|itijo<|i|dd
ddd|i|dd
dddndS(Ns
s-=is%Running %s.test04_PartialGetAndPut...tpartialTestt1it2tpartialtest2i0utrobint0000RniRoit1111ii(R3RRRR
RBR4RRW(RR3RGRH((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest04_PartialGetAndPuts	
cCso|i}to dGddGHd|iiGHnx8tdddD]$}d|}|i|d	|qCWdS(
Ns
s-=isRunning %s.test05_GetSize...iiPissize%sR(R3RRRR
R?RB(RR3tiRG((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest05_GetSizes	

cCswtidjodSn|i}to dGddGHd|iiGHn|idd|i}|i}dS(	Nis
s-=isRunning %s.test99_Truncate...tabcdetABCDE(ii(RRR3RRRR
RBttruncate(RR3RI((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest06_Truncate%s	
N(R
RRt
DB_UNKNOWNRR6R4R7R1R5RR*R(R@R:R=R8RAR`RiRRRRRRR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR+s,		+			\	<					tBasicBTreeTestCasecBseZeiZRS((R
RRR~R(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR;stBasicHashTestCasecBseZeiZRS((R
RRtDB_HASHR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR?st BasicBTreeWithThreadFlagTestCasecBseZeiZeiZRS((R
RRR~Rt	DB_THREADR6(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRCs	tBasicHashWithThreadFlagTestCasecBseZeiZeiZRS((R
RRRRRR6(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRHs	tBasicWithEnvTestCasecBsQeZeiZdZeieiBeiBZdZ	ei
djo[	nRS(icCs|ipdSnto dGddGHd|iiGHn|ii|id}|ii|id||ii	|dS(Ns
s-=is'Running %s.test07_EnvRemoveAndRename...s.renamed(
R!RRRR
R3R;R0tdbrenameR1tdbremove(Rtnewname((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest07_EnvRemoveAndRenameTs



i(ii(R
RRRR6Rt
DB_INIT_MPOOLtDB_INIT_LOCKR*RR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRMs		tBasicBTreeWithEnvTestCasecBseZeiZRS((R
RRR~R(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRistBasicHashWithEnvTestCasecBseZeiZRS((R
RRRR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRmstBasicTransactionTestCasecBsreZeieiBZdZeieiBeiBei	BZ
eiZdZdZ
dZdZdZRS(icCs|iiti|dS(N(RjRCRR=(R((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR={s
cCs8|ii}ti|d||ii|_dS(NRE(R!R{RR8Rj(RRj((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR8scCs|i}to dGddGHd|iiGHn|idd|i|ii|ii|_|idd|i|ii	|ii|_|i
|i}|i}d}xI|dj	o;|d}to|d	djo	|GHn|i
}qW|i|ii	y|iidddWntij
onXtid
jo|iid}n|iititiB}x"|D]}to
d|GHqqWtidjo|iiti}n|ii|_dS(Ns
s-=is!Running %s.test06_Transactions...snew recsthis is a new recordiiidis
log file: i(ii(ii(R3RRRR
RBRjtabortR!R{RCR|RtR1RuR;ttxn_checkpointRtDBIncompleteErrorRtlog_stattlog_archivetDB_ARCH_ABStDB_ARCH_LOGtDB_ARCH_REMOVE(RR3RR^RtstatDicttlogstlog((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest06_TransactionssJ	




	

cCstidjodSn|i}to dGddGHd|iiGHn|idd|ii}|i	|}|i	|}|i
dS(	Nis
s-=is Running %s.test07_TxnTruncate...RR(ii(RRR3RRRR
RBR!R{RRC(RR3RjRI((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest07_TxnTruncates	
cCs|ii}|iy|iWntij
o	}nXtd|ii}|iy|iWntij
o	}nXtddS(NsBDBTxn.abort() called after DB_TXN no longer valid w/o an exceptionsCDBTxn.commit() called after DB_TXN no longer valid w/o an exception(R!R{RRRtRuntimeErrorRC(RRjR9((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest08_TxnLateUses
	
(R
RRRRzR6RRRtDB_INIT_TXNR*R(R=R8RRR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRss
				=	tBTreeTransactionTestCasecBseZeiZRS((R
RRR~R(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRstHashTransactionTestCasecBseZeiZRS((R
RRRR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRstBTreeRecnoTestCasecBs#eZeiZeiZdZRS(cCs|i}to dGddGHd|iiGHn|id}to
dG|GHn|i}|id|i}to
dG|GHn|i}|i	dS(	Ns
s-=is!Running %s.test07_RecnoInBTree...isRecord #200 is t0200srecno of d['0200'] is (
R3RRRR
RSR|Ryt	get_recnoRrR;(RR3R^RRI((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest07_RecnoInBTrees	



(R
RRR~Rt	DB_RECNUMR4R(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRs		t BTreeRecnoWithThreadFlagTestCasecBseZeiZRS((R
RRRR6(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRstBasicDUPTestCasecBseZeiZdZRS(c	Cs[|i}to dGddGHd|iiGHn|iddx$diD]}|id|qMW|id	d
|id}to	|GHn|i}|id}|i	}|id}|i
}|i}|id}x.|dj	o to	|GHn|i}qW|id|i
}to	|GHn|idS(Ns
s-=is"Running %s.test08_DuplicateKeys...tdup0tbefores-The quick brown fox jumped over the lazy dog.tdup1tdup2tafter(R3RRRR
RBR.RSR|RyRuRtnext_dupR1t
next_nodupR;(	RR3RFRHRR^RuRR((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest08_DuplicateKeyss<	

	
	
	(R
RRRWR4R(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRs	tBTreeDUPTestCasecBseZeiZRS((R
RRR~R(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRKstHashDUPTestCasecBseZeiZRS((R
RRRR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRNstBTreeDUPWithThreadTestCasecBseZeiZeiZRS((R
RRR~RRR6(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRQs	tHashDUPWithThreadTestCasecBseZeiZeiZRS((R
RRRRRR6(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRUs	tBasicMultiDBTestCasecBs eZdZdZdZRS(RtcCs)|itijotiSntiSdS(N(RRR~R(R((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyt	otherType_sc
	Cs2|i}to dGddGHd|iiGHnti|i}|i|id|i	|i
tiBti|i}|i|id|i|i
tiBx-di
D]}|i||i|qWx%tiD]}|i||dqW|i|i|i|i|i|id|_}}}ti|i|_}|i|i|id	|i
ti|i}|i|idd	|i
ti|i}|i|idd	|i
|i}|i}|i}d
}|i}	xI|	dj	o;|d}to|dd
jo	|	GHn|i}	qWd
}|i}	x8|	dj	o*|d}to	|	GHn|i}	qwWd
}|i}	x8|	dj	o*|d}to	|	GHn|i}	qW|i|i|i|i|idS(
Ns
s-=isRunning %s.test09_MultiDB...tsecondtthirds,The quick brown fox jumped over the lazy dogiFRiii2(R3RRRR
RR2R!R)R0RR6R+RR.RBRAtstringtlettersRZR;R1R5R|RtRu(
Rtd1td2td3RFtc1Rtc3RR^((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyttest09_MultiDBesz	










	

	

	



(R
RR5RR(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyR\s	tBTreeMultiDBTestCasecBs7eZeiZeiZdZeieiBei	BZ
RS(i(R
RRR~RRR6RRRR*(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRs		tHashMultiDBTestCasecBs7eZeiZeiZdZeieiBei	BZ
RS(i(R
RRRRRR6RRRR*(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyRs		cCsti}|itit|itit|itit|itit|itit|itit	|itit
|itit|itit|itit
|itit|itit|itit|itit|itit|itit|itit|S(N(tunittestt	TestSuitetaddTestt	makeSuiteRRRRRRRRRRRRRRRRR(tsuite((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pyt
test_suites&t__main__tdefaultTestR(+t__doc__RRRRRR,RRR&tbsddb3RtImportErrortbsddbttest_allRRJtTestCaseRRRRRRRRRRRRRRRRRRRRRRRR
tmain(((s2/usr/local/lib/python2.5/bsddb/test/test_basics.pys<module>sT
y2X
	


Man Man