Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/bsddb/test/test_db.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@s�ddlZddlZddlZddlmZmZmZmZdejfd��YZ	de	fd��YZ
de	fd��YZd	e	fd
��YZde	fd��YZ
d
e	fd��YZd�Zedkr�jdd�ndS(i�N(tdbttest_supporttget_new_environment_pathtget_new_database_pathtDBcBseZd�Zd�ZRS(cCst�|_tj�|_dS(N(RtpathRR(tself((s(/sys/lib/python2.7/bsddb/test/test_db.pytsetUp
scCs'|jj�|`tj|j�dS(N(RtcloseRtunlinkR(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyttearDowns
(t__name__t
__module__RR
(((s(/sys/lib/python2.7/bsddb/test/test_db.pyR	s	t
DB_generalcBsSeZd�Zd�Zd�Zd�Zej�dkrHd�Znd�Z	RS(	cCsE|jj|jdtjdtj�|jtj|jj��dS(Ntdbtypetflags(RtopenRtDB_HASHt	DB_CREATEtassertEqualtget_open_flags(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_get_open_flagss%cCsS|jj|jdtjdtjtjB�|jtjtjB|jj��dS(NRR(RRRRRt	DB_THREADRR(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_get_open_flags2s!cCsK|jj|jdtjdtj�|j|jdf|jj��dS(NRR(RRRRRRtNonet
get_dbname(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_get_dbname_filenames%cCsid}|jj|jd|dtjdtj�|j|j|f|jj��d�}d�}dS(Nsjcea-random-nametdbnameRRcSsGx@dddgD]/}|jj|�|j||jj��qWdS(Niili(Rt
set_bt_minkeyRt
get_bt_minkey(Rti((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_bt_minkey'scSsr|jjd�|jd|jj��|jjd�|jd|jj��|jtj|jjd�dS(Ni�i�i�(Rt
set_lorderRt
get_lordertassertRaisestDBInvalidArgError(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_lorder,s
(RRRRRRR(RtnameRR$((s(/sys/lib/python2.7/bsddb/test/test_db.pyt!test_get_dbname_filename_database!s!
"	iicCsbtjtjtjtjtjg}x7|D]/}|jj|�|j||jj��q+WdS(N(	RtDB_PRIORITY_VERY_LOWtDB_PRIORITY_LOWtDB_PRIORITY_DEFAULTtDB_PRIORITY_HIGHtDB_PRIORITY_VERY_HIGHtset_priorityRtget_priority(RRtflag((s(/sys/lib/python2.7/bsddb/test/test_db.pyt
test_priority4s
cCsU|j|jj��|jj|jdtjdtj�|j|jj��dS(NRR(tassertFalseRtget_transactionalRRRR(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_get_transactional<s%(ii(
RRRRRR&RtversionR/R2(((s(/sys/lib/python2.7/bsddb/test/test_db.pyR
s				tDB_hashcBs#eZd�Zd�Zd�ZRS(cCsGx@dddgD]/}|jj|�|j||jj��qWdS(Niii(Rt
set_h_ffactorRt
get_h_ffactor(Rtffactor((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_h_ffactorBscCsUxNdddgD]=}|dd}|jj|�|j||jj��qWdS(Niiii(Rtset_h_nelemRtget_h_nelem(Rtnelem((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_h_nelemGscCs�xJtdd�D]9}d|>}|jj|�|j||jj��qW|jtj|jjd�|jtj|jjd�dS(Ni	iiiii(txrangeRtset_pagesizeRtget_pagesizeR"R#(RR((s(/sys/lib/python2.7/bsddb/test/test_db.pyt
test_pagesizeMs
(RRR8R<R@(((s(/sys/lib/python2.7/bsddb/test/test_db.pyR4As		tDB_txncBs#eZd�Zd�Zd�ZRS(cCsbt�|_tj�|_|jj|jtjtjBtjBtj	B�tj
|j�|_dS(N(RthomeDirRtDBEnvtenvRRt
DB_INIT_MPOOLtDB_INIT_LOGtDB_INIT_TXNR(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyRZs
cCsC|jj�|`|jj�|`tj|j�d�}dS(NcSsi|jjtj�|jtj|jj��|jjtj�|jtjtjB|jj��dS(N(Rt	set_flagst	DB_CHKSUMRt	get_flagstDB_TXN_NOT_DURABLE(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyt
test_flagshs
(RRRDRtrmtreeRB(RRL((s(/sys/lib/python2.7/bsddb/test/test_db.pyR
as

cCsY|j|jj��|jjddtjdtjtjB�|j|jj��dS(NtXXXRR(R0RR1RRRtDB_AUTO_COMMITt
assertTrue(R((s(/sys/lib/python2.7/bsddb/test/test_db.pyR2os(RRRR
R2(((s(/sys/lib/python2.7/bsddb/test/test_db.pyRAYs		tDB_recnocBs#eZd�Zd�Zd�ZRS(cCs�xCddgD]5}|jj|�|jt|�|jj��q
Wx=ddgD]/}|jj|�|j||jj��qSWdS(Nt t*iaiA(Rt
set_re_padRtordt
get_re_pad(RR((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_re_padws#cCs�xCddgD]5}|jj|�|jt|�|jj��q
Wx=ddgD]/}|jj|�|j||jj��qSWdS(NRRRSiaiA(Rtset_re_delimRRUtget_re_delim(RR((s(/sys/lib/python2.7/bsddb/test/test_db.pyt
test_re_delims#cCsGx@dddgD]/}|jj|�|j||jj��qWdS(Nttestttest2ttest3(Rt
set_re_sourceRt
get_re_source(RR((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_re_source�s(RRRWRZR`(((s(/sys/lib/python2.7/bsddb/test/test_db.pyRQvs		tDB_queuecBseZd�Zd�ZRS(cCsJxCddddgD]/}|jj|�|j||jj��qWdS(Ni!iAi,i�(Rt
set_re_lenRt
get_re_len(RR((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_re_len�scCsGx@dddgD]/}|jj|�|j||jj��qWdS(Nii<id(Rtset_q_extentsizeRtget_q_extentsize(RR((s(/sys/lib/python2.7/bsddb/test/test_db.pyttest_q_extentsize�s(RRRdRg(((s(/sys/lib/python2.7/bsddb/test/test_db.pyRa�s	cCs~tj�}|jtjt��|jtjt��|jtjt��|jtjt��|jtjt��|S(N(	tunittestt	TestSuitetaddTestt	makeSuiteR
RAR4RQRa(tsuite((s(/sys/lib/python2.7/bsddb/test/test_db.pyt
test_suite�st__main__tdefaultTestRm(Rhtostglobttest_allRRRRtTestCaseRR
R4RARQRaRmRtmain(((s(/sys/lib/python2.7/bsddb/test/test_db.pyt<module>s"
.	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.