%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_compat.pyc

ó
Oêáac@sdZddlZddlZddlZddlmZmZmZmZm	Z	m
Z
dejfd„ƒYZd„Z
edkr™ejdd	ƒndS(
sU
Test cases adapted from the test_bsddb.py module in Python's
regression test suite.
iÿÿÿÿN(tdbthashopentbtopentrnopentverbosetget_new_database_pathtCompatibilityTestCasecBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCstƒ|_dS(N(Rtfilename(tself((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pytsetUpscCs/ytj|jƒWntjk
r*nXdS(N(tostremoveRterror(R((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyttearDownscCs|jtdƒdS(NR(tdo_bthash_testR(R((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyt
test01_btopenscCs|jtdƒdS(NR(RR(R((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyttest02_hashopensc	Cs djƒ}trdGHnt|jdƒ}x,tt|ƒƒD]}||||d<q?W|d|d|df}trˆd|GHn|j|ddd	ƒ|jdƒ}|dkrÔ|jdt	|ƒƒnd|d
<|j
ƒ~t|jdƒ}d|d<d„}|jt||ƒd„}|jt
||ƒ|d=|jƒ}x=|r‘tri|GHny|jƒ}WqUtk
rPqUXqUW|j
ƒdS(Ns-The quick brown fox jumped over the lazy dog.s
Testing: rnopentciiis%s %s %stquicksdata mismatch!tbrowns$recno database set_location failed: stwenty-fiveitwttwentyicSs|d}dS(Ni((tftrec((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pytnoRec8scSs|d}dS(Nsa string((RR((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pytbadKey<s(iR(tsplitRRRtrangetlentassertEqualtset_locationtfailtreprtclosetassertRaisestKeyErrort	TypeErrortfirsttnext(	RtdataRtxtgetTesttrvRRR((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyt
test03_rnopens@


			
	cCs t|jdƒ}|jƒdS(Ntn(RRR!(RR((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyt
test04_n_flagNscCstrdG|GHn||jdƒ}tr2dGHn|rItrWdGHqWntrWdGHnd|d<d|d	<d
|d<d|d<d
|d<d|d<trºd|d	|d|dfGHntrÈdGHn|j|jƒdƒ}|d!kr|jdt|ƒƒnxZy|jƒ}Wn5tk
rQ|j||j	ƒdƒ|j
ƒPnXtr
|GHq
q
W|j|jdƒdƒ|t
krÁ|jdƒ}|d"krõ|jdt|ƒƒqõn4y|jdƒ}Wntk
rçnX|jdƒ|jƒ|jƒy)|r#tr1dGHq1ntr1dGHnWntjk
rHnX|jdƒ~trgdGHn||jdƒ}d|d<tr‘dGHnx,|jƒD]}||}trž|GHqžqžWd„}	|jt|	|ƒd „}
|jt|
|ƒ|jƒdS(#Ns

Testing: Rscreation...struth test: truestruth test: falsett0tGuidotatvantbtRossumtinventedtdtPythonRs%s %s %sskey ordering...isincorrect first() result: sError, last <> last!sError, missing key!teswrong key,value returned: s7set_location on non-existent key did not raise KeyErrorsException expectedsmodification...Rt
discovereds	access...cSs|d}dS(Nsno such key((RR((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyR¥scSs|d}dS(Ni((RR((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyR©s(R/R.(RR7(RRRR%RR R&R#Rtlasttprevioust
assertTruethas_keyRtsyncR!RtDBErrortkeysR"R$(RtfactorytwhatRtstartRR8tkeytwordRR((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyRSsŠ





!








		(	t__name__t
__module__R	R
RRR+R-R(((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyR
s					0	cCs
tjtƒS(N(tunittestt	makeSuiteR(((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyt
test_suite³st__main__tdefaultTestRJ(t__doc__R
tstringRHttest_allRRRRRRtTestCaseRRJRFtmain(((s2/usr/local/lib/python2.7/bsddb/test/test_compat.pyt<module>s.¦	

Zerion Mini Shell 1.0