tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
X\¬Qc@sdZddlZddlZddlZddlmZmZmZmZm    Z    m
Z
dej fd„ƒ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((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pytsetUpscCs/ytj|jƒWntjk
r*nXdS(N(tostremoveRterror(R((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyttearDownscCs|jtdƒdS(NR(tdo_bthash_testR(R((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyt test01_btopenscCs|jtdƒdS(NR(RR(R((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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Ô|jd t    |ƒƒnd |d <|j
ƒ~t|jdƒ}d|d<d„}|j t ||ƒd„}|j t ||ƒ|d=|jƒ}x=|r‘tri|GHny|jƒ}WqUt k
rPqUXqUW|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: s twenty-fiveitwttwentyicSs|d}dS(Ni((tftrec((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pytnoRec8scSs|d}dS(Nsa string((RR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pytbadKey<s(iR(tsplitRRRtrangetlent assertEqualt set_locationtfailtreprtcloset assertRaisestKeyErrort    TypeErrortfirsttnext(    RtdataRtxtgetTesttrvRRR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyt test03_rnopens@   
 
 
                  cCs t|jdƒ}|jƒdS(Ntn(RRR!(RR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyt test04_n_flagNsc CstrdG|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|ƒƒnxYy|jƒ}Wn5tk
rQ|j||j    ƒdƒ|j
ƒPnXtr
|GHq
q
|j |j dƒdƒ|t krÀ|jdƒ}|d"krô|jdt|ƒƒqôn4y|jdƒ}Wntk
rænX|jdƒ|jƒ|jƒy)|r"tr0dGHq0ntr0dGHnWntjk
rGnX|jdƒ~trfdGHn||jdƒ}d|d<trdGHnx,|jƒD]}||}tr|GHqqWd„}    |jt|    |ƒd „}
|jt|
|ƒ|jƒdS(#Ns
 
Testing: Rs creation...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(Ns no such key((RR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyR¥scSs|d}dS(Ni((RR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyR©s(R/R.(RsPython(RRRR%RR R&R#Rtlasttprevioust
assertTruethas_keyRtsyncR!RtDBErrortkeysR"R$( RtfactorytwhatRtstartRR8tkeytwordRR((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyRSsŠ  
 
 
 
 
 
!  
 
 
 
 
         (    t__name__t
__module__R    R RRR+R-R(((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyR s                    0    cCs tjtƒS(N(tunittestt    makeSuiteR(((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyt
test_suite³st__main__t defaultTestRJ(t__doc__R
tstringRHttest_allRRRRRRtTestCaseRRJRFtmain(((s^/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/bsddb/test/test_compat.pyt<module>s .¦