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

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


��Qc@sddlZddlZddlmZmZmZmZdejfd��YZd�Z	e
dkr{ejdd�ndS(	i�N(tdbttest_supporttget_new_environment_pathtget_new_database_pathtDBSequenceTestcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zej
�dkr~d�Znd
�Zd�ZRS(cCs�d|_t�|_d|_tj�|_|jj|jtjtj	Bd�tj
|j�|_|jj|jtjtjd�dS(Nlttesti�(
t
int_32_maxRthomeDirtfilenameRtDBEnvtdbenvtopent	DB_CREATEt
DB_INIT_MPOOLtDBtdtDB_BTREE(tself((s./sys/lib/python2.7/bsddb/test/test_sequence.pytsetUps		#cCs�t|d�r%|jj�|`nt|d�rJ|jj�|`nt|d�ro|jj�|`ntj|j�dS(NtseqRR
(thasattrRtcloseRR
RtrmtreeR(R((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttearDowns
	
	
	c	Cs�tj|jdd�|_d|j}|jd|�|jd|jj|��|jd|jjdddddtj	��|j||jj
d��|j|d|jj
��dS(	Ntflagsii
l(tkeytidttxni(Rt
DBSequenceRRRtassertEqualtNonet
initial_valueRRtget(Rtstart_value((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_gets
.c	Csxtj|jdd�|_|jd|jjdddddtj��|jd|jjdddd��|`dS(NRiRtfooR(	RRRRRRRRtremove(R((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_remove(s.%c	Csltj|jdd�|_d}|jd|jjd|dddtj��|j||jj��dS(NRiR#RR(	RRRRRRRRtget_key(RR((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_get_key.s.c	Csitj|jdd�|_|jd|jjdddddtj��|j|j|jj��dS(NRiRR#R(	RRRRRRRRtget_dbp(R((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_get_dbp4s.c	Cs�tj|jdd�|_d}|jd|jj|��|jd|jjdddddtj��|j||jj	��dS(NRii
RR#R(
RRRRRRt
set_cachesizeRRt
get_cachesize(Rt
cashe_size((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_cachesize9s
.c	Cs�tj|jdd�|_tj}|jd|jj|��|jd|jjdddddtj	��|j||jj
�|@�dS(NRiRR#R(RRRRtDB_SEQ_WRAPRRt	set_flagsRRt	get_flags(Rtflag((s./sys/lib/python2.7/bsddb/test/test_sequence.pyt
test_flags@s
	.c	Cs�tj|jdd�|_d|jd|jdf}|jd|jj|��|jj|d�|jd|jj	dddddtj
��|j||jj��dS(	NRii
iiRR#R(RRRRRRRt	set_rangeRRRt	get_range(Rt	seq_range((s./sys/lib/python2.7/bsddb/test/test_sequence.pyt
test_rangeGs.c	Cs�tj|jdd�|_|jd|jjdddddtj��|jj�}x(dD] }|j	||kd|�q_WdS(NRiRR#Rtnowaittmintmaxtvaluetcurrentt
cache_sizet
last_valuetwaitsparameter %s isn't in stat info(	R7sminsmaxsvalueR;RR<s
last_valueswait(
RRRRRRRRtstatt
assertTrue(RR?tparam((s./sys/lib/python2.7/bsddb/test/test_sequence.pyt	test_statOs.
iic	Cs�tj�}|jddtjdtj�tj|dd�}|jtj|jdddddd�|jtj	|j
�|j�dS(NtdbtypeRiRRR(RRRRtDB_HASHRRtassertRaisestDBNotFoundErrortDBInvalidArgErrorR?R(RRR((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_stat_crashYsc	Cs�d}|jd|�d}|jd|�tj|jdd	�|_|jd|jj|d��|jd|jjd
ddddtj��|j|d|jj	d��|j||jj	d��|jj
dddd	�tj|jdd	�|_|jd|jj|��|jd|jjd
ddddtj��|j||jj	d��|j|d|jj	d��dS(Nli?il��l�il���RiRRRll��l�l���(RRRRRRRRRR R$(Rt
value_plustvalue_minus((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_64bitses" !
 !
cCs@tj|j�|_|jj�|jj�|jj�dS(N(RRRRR(R((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_multiple_close{s

(ii(t__name__t
__module__RRR"R%R'R)R-R2R6RBRtversionRHRKRL(((s./sys/lib/python2.7/bsddb/test/test_sequence.pyRs	
	
										cCs&tj�}|jtjt��|S(N(tunittestt	TestSuitetaddTestt	makeSuiteR(tsuite((s./sys/lib/python2.7/bsddb/test/test_sequence.pyt
test_suite�st__main__tdefaultTestRU(RPtosttest_allRRRRtTestCaseRRURMtmain(((s./sys/lib/python2.7/bsddb/test/test_sequence.pyt<module>s"z	

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.