%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/bsddb/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/bsddb/test/test_misc.pyo

ó
Oêáac@sdZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
dejfd„ƒYZd„Z
edkr™ejdd	ƒndS(
s&Miscellaneous bsddb module test cases
iÿÿÿÿN(tdbtdbshelvethashopenttest_supporttget_new_environment_pathtget_new_database_pathtMiscTestCasecBsbeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„ZRS(
cCstƒ|_tƒ|_dS(N(RtfilenameRthomeDir(tself((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pytsetUpscCs$tj|jƒtj|jƒdS(N(RtunlinkRtrmtreeR(R	((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttearDownscCs9tj|jƒ}|jƒ|jtj|jdƒdS(Ntfoo(RtopenRtclosetassertRaisesRtDBErrortget(R	tdbs((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest01_badpointers
cCstjƒ}|j|jƒ|j|jtjƒtjddkr^|j	|j|jƒn|j	t
|jdƒ|jƒdS(Niitascii(RtDBEnvtassertIsNonetdb_homeRRt	DB_CREATEtsystversion_infotassertEqualtbytes(R	tenv((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest02_db_homescCs9t|jƒ}|jƒt|ƒ}|j|dƒdS(Ns{}(RRRtreprR(R	Rtrp((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest03_repr_closed_db#s
cCs©t|jƒ}i}xHtdƒD]:}td|ƒ|t|ƒ<td|ƒ|t|ƒ<q"W|jƒt|jƒ}t|ƒ}|j|t|ƒƒ|jƒdS(Nid(RRtxrangeR!RR(R	RtdtiR"((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest04_repr_db)s
cCsyzWtjƒ}|j|jdtjtjtjBƒ|jƒ}|j	dtj
ƒ}Wd|jƒtj
|jƒXdS(Ns/foo(RtDBRRtNonetDB_BTREERt	DB_THREADtcursorRtDB_SETRRR(R	tdb1tcurstt((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest05_double_free_make_key_dbt<s
cCsûzÙtjƒ}|j|jdtjtjƒd|d<d|d<d|d<d|d<|jƒ}|jƒ|j	ddddg|ƒ|j	|ddƒ|j	|ddƒ|j	|ddƒ|j	|ddƒWd|j
ƒtj|jƒXdS(	Nseh?taseh zed.sas
eh zed eh?saas	eh eh eh!taaa(
RR(RRR)tDB_HASHRtkeystsortRRRR(R	R.R5((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest06_key_with_null_bytesIs 





cCs"ztjƒ}|jtjƒ|j|jtjtjƒd|d<d|d<|jdg|j	ƒƒ|j
ddƒ|jddg|j	ƒƒ|jƒtjƒ}|j|jtjƒ|jd	d
g|j	ƒƒd|d<|jdg|j	ƒƒWd|jƒtj
|jƒXdS(NtehR2tAtAasnew A(R2R9(R2R9(R2R:(R2R9(R2R:(R2snew A(RR(t	set_flagst
DB_DUPSORTRRR4RRtitemstputRRR(R	R.((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest07_DB_set_flags_persists\s"




cCsÚ|jttjtƒƒxˆtjjƒD]w\}}|jdƒr)|jdƒr)|jt|tjƒd|ƒ|dkr |j	t|t
ƒd|ƒq q)q)W|jttjt
ƒƒ|jttjt
ƒƒdS(NR(tErrortmsgtDBKeyEmptyErrortDBNotFoundError(RBRC(
t
assertTruet
issubclassRRt	Exceptiont__dict__R=t
startswithtendswithtassertFalsetKeyErrorRBRC(R	R&tj((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyttest08_ExceptionTypesus&(t__name__t
__module__R
R
RR R#R'R1R7R?RM(((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyRs				
			
		cCs
tjtƒS(N(tunittestt	makeSuiteR(((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyt
test_suite…st__main__tdefaultTestRR(t__doc__tosRRPttest_allRRRRRRtTestCaseRRRRNtmain(((s0/usr/local/lib/python2.7/bsddb/test/test_misc.pyt<module>s.z	

Zerion Mini Shell 1.0