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

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


��Qc@s�dZddlZddlZddlmZddlZddlmZmZmZdej	fd��YZ
d�Zedkr�ej
d	d
�ndS(s&
TestCases for exercising a Queue DB.
i�N(tpprint(tdbtverbosetget_new_database_pathtSimpleQueueTestCasecBs,eZd�Zd�Zd�Zd�ZRS(cCst�|_dS(N(Rtfilename(tself((s+/sys/lib/python2.7/bsddb/test/test_queue.pytsetUpscCs/ytj|j�Wntjk
r*nXdS(N(tostremoveRterror(R((s+/sys/lib/python2.7/bsddb/test/test_queue.pyttearDownscCs{tr%dGddGHd|jjGHntj�}|jd�|j|jtjtj	�tr�dddGHt
|j��nx"tj
D]}|j|d�q�W|jt|�ttj
��|jdd	�|jd
d�|jdd
�|jdd�|jt|�ttj
�d�trMdddGHt
|j��n|j�~tj�}|j|j�tr�dddGHt
|j��n|jdd�|jddd�|j�}tr�ddGHt
|j��n|j�}x$|r#tr|GHn|j�}qW|j�trTdddGHt
|j��n|jt|�dd�|j�dS(Ns
s-=isRunning %s.test01_basic...i(sbefore appendst-idssome more dataiesand some more iKsout of orderisreplacement dataisbefore closes
after opensone moresanother onettxnsafter appendsafter consume loopiskif you see this message then you need to rebuild Berkeley DB 3.1.17 with the patch in patches/qam_stat.diff(Rt	__class__t__name__RtDBt
set_re_lentopenRtDB_QUEUEt	DB_CREATERtstattstringtletterstappendtassertEqualtlentputtclosetNonetcursortconsume(Rtdtxtctrec((s+/sys/lib/python2.7/bsddb/test/test_queue.pyttest01_basicsZ


#



	

cCs6tr%dGddGHd|jjGHntj�}|jd�|j|jtjtj	�tr�dddGHt
|j��nx"tj
D]}|j|d�q�W|jt|�ttj
��|jdd	�|jd
d�|jdd
�|jdd�|jt|�ttj
�d�trMdddGHt
|j��n|j�~tj�}|j|j�tr�dddGHt
|j��n|jd�tr�dddGHt
|j��n|j�}x$|rtr�GHn|j�}q�Wtr(dddGHt
|j��n|j�dS(Ns
s-=is Running %s.test02_basicPost32...i(sbefore appendsRidssome more dataiesand some more iKsout of orderisreplacement dataisbefore closes
after opensone moresafter appendsafter consume loop(RRRRRRRRRRRRRRRRRRRR(RR R!R#((s+/sys/lib/python2.7/bsddb/test/test_queue.pyttest02_basicPost32^sP


#




	
(Rt
__module__RRR$R%(((s+/sys/lib/python2.7/bsddb/test/test_queue.pyR
s			FcCs
tjt�S(N(tunittestt	makeSuiteR(((s+/sys/lib/python2.7/bsddb/test/test_queue.pyt
test_suite�st__main__tdefaultTestR)(t__doc__RRRR'ttest_allRRRtTestCaseRR)Rtmain(((s+/sys/lib/python2.7/bsddb/test/test_queue.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.