��Qc@sddlZddlZddlmZmZmZmZdejfd��YZd�Z e
dkr{ejdd�ndS( i�N(tdbttest_supporttget_new_environment_pathtget_new_database_pathtDBSequenceTestcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Zej
�dkr~d�Znd
�Zd�ZRS(cCs�d|_t�|_d|_tj�|_|jj|jtjtj Bd�tj
|j�|_|jj|jtjtjd�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_valueRRtget(Rtstart_value((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_gets
.c Csxtj|jdd�|_|jd|jjdddddtj��|jd|jjdddd��|`dS(NRiRtfooR( RRRRRRRRtremove(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( RRRRRRRRtget_key(RR((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_get_key.s.c Csitj|jdd�|_|jd|jjdddddtj��|j|j|jj��dS(NRiRR#R( RRRRRRRRtget_dbp(R((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_get_dbp4s.c Cs�tj|jdd�|_d}|jd|jj|��|jd|jjdddddtj��|j||jj ��dS(NRii
RR#R(
RRRRRRt
set_cachesizeRRt
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_flagsRRt 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_rangeRRRt 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(
RRRRRRRRtstatt
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_HASHRRtassertRaisestDBNotFoundErrortDBInvalidArgErrorR?R(RRR((s./sys/lib/python2.7/bsddb/test/test_sequence.pyttest_stat_crashYsc Cs�d}|jd|�d}|jd|�tj|jdd �|_|jd|jj|d��|jd|jjd
ddddtj��|j|d|jj d��|j||jj d��|jj
dddd �tj|jdd �|_|jd|jj|��|jd|jjd
ddddtj��|j||jj d��|j|d|jj d��dS(Nli?il��l�il���RiRRRll��l�l���(RRRRRRRRRR 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�st__main__tdefaultTestRU(RPtosttest_allRRRRtTestCaseRRURMtmain(((s./sys/lib/python2.7/bsddb/test/test_sequence.pyt<module>s"z
|