mς &U²Ic@sΘdZdkZdkZdkZdkZdklZdkZydklZWn e j odk lZnXdk l Z dei fd„ƒYZd„Zedjoeid d ƒndS( s& TestCases for exercising a Queue DB. N(spprint(sdb(sverbosetSimpleQueueTestCasecBs,tZd„Zd„Zd„Zd„ZRS(NcCstiƒ|_dS(N(ttempfiletmktemptselftfilename(R((t2/data/zmath/lib/python2.4/bsddb/test/test_queue.pytsetUpscCs1yti|iƒWntij onXdS(N(tostremoveRRterror(R((RttearDownscCskto dGddGHd|iiGHntiƒ}|idƒ|i|i ti ti ƒto!dddGHt |i ƒƒnx"tiD]}|i|dƒqŽWt|ƒdjpt‚|id d ƒ|id d ƒ|id dƒ|iddƒt|ƒdjpt‚to!dddGHt |i ƒƒn|iƒ~tiƒ}|i|i ƒto!dddGHt |i ƒƒn|idƒ|iƒ}to!dddGHt |i ƒƒn|iƒ}x(|o to |GHn|iƒ}qζW|iƒto!dddGHt |i ƒƒnt|ƒdjp td‚|iƒdS(Ns s-=isRunning %s.test01_basic...i(sbefore appendst-i4idssome more dataiesand some more iKs out of orderisreplacement datai7s before closes after opensone mores after appendsafter consume loopisjif you see this message then you need to rebuild BerkeleyDB 3.1.17 with the patch in patches/qam_stat.diff(tverboseRt __class__t__name__tdbtDBtdt set_re_lentopenRtDB_QUEUEt DB_CREATEtpprinttstattstringtletterstxtappendtlentAssertionErrortputtclosetcursortctconsumetrec(RR!R#RR((Rt test01_basic!sZ                cCscto dGddGHd|iiGHntiƒdjoto dGHndSntiƒ}|id ƒ|i |i ti ti ƒto!d d dGHt |iƒƒnx"tiD]}|i|d ƒqΉWt|ƒd jpt‚|id dƒ|iddƒ|iddƒ|iddƒt|ƒdjpt‚to!dd dGHt |iƒƒn|iƒ~tiƒ}|i |i ƒto!dd dGHt |iƒƒn|idƒto!dd dGHt |iƒƒn|iƒ}x(|o to |GHn|iƒ}qWto!dd dGHt |iƒƒn|iƒdS(Ns s-=is Running %s.test02_basicPost32...iiis"Test not run, DB not new enough...i(sbefore appendsR i4idssome more dataiesand some more iKs out of orderisreplacement datai7s before closes after opensone mores after appendsafter consume loop(iii(R RR RRtversionRRRRRRRRRRRRRRRRRR"R#(RR#RR((Rttest02_basicPost32cs\               (Rt __module__RR R$R&(((RRs   BcCs titƒS(N(tunittestt makeSuiteR(((Rt test_suite¨st__main__t defaultTestR*(t__doc__tsysRRRRR(tbsddb3Rt ImportErrortbsddbttest_allR tTestCaseRR*Rtmain( RRRR(RRR.R*RR ((Rt?s    ’