mò )á¸Ec@s’dZdkZdkZdkZeiƒdklZdfd„ƒYZdeifd„ƒYZ d„Z e djoei d d ƒndS( sXFieldIndex unit tests. $Id: testFieldIndex.py 40218 2005-11-18 14:39:19Z andreasjung $ N(s FieldIndextDummycBs)tZd„Zd„Zd„ZeZRS(NcCs ||_dS(N(tfootselft_foo(RR((tU/data/zmath/zope/lib/python/Products/PluginIndexes/FieldIndex/tests/testFieldIndex.pyt__init__scCs|iS(N(RR(R((RRscCs d|iS(Ns (RR(R((Rt__str__"s(t__name__t __module__RRRt__repr__(((RRs   tFieldIndexTestscBsqtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z RS( sTest FieldIndex objects. c Cs»tdƒ|_g|_dtdƒfdtdƒfdtdƒfdtd ƒfd td ƒfd td ƒfdtd ƒfdtdƒfdtdƒfg |_h|_h|_xF|iD];\}}||i|<|ii |gƒ}||i|t indexSizeR@RRRARRRRCR,R!R5R"R#R$R%(RRRER((Rt testPopulateds$  ')# ) *0#cCsQ|iƒ|i}|i|i|dd!ƒd|iidƒjpt‚dS(s Make sure 0 gets indexed iþÿÿÿiÿÿÿÿiRN( RR+RRER5R&RRCR1(RRE((RttestZero›s   cCsN|iƒ|i}|i|i|dƒd|iidƒjpt ‚dS(s make sure None gets indexed iÿÿÿÿRN( RR+RRER5R'RRRCR1(RRE((RttestNone¢s   cCs{|iƒ|iihdd<ƒ\}}t|ƒdgjpt‚|iidƒdjpt‚t dƒ}|ii d|ƒ|iihdd<ƒ\}}t|ƒdgjpt‚|iidƒdjpt‚|` |ii d|ƒ|iihdd<ƒ\}}t|ƒgjpt‚y|iidƒ}Wntj onXtt|ƒƒ‚dS(NRR itworld(RR+RR,R.R/tlistR1tkeyForDocumentRtdR*Rt should_not_betKeyErrort ValueErrortrepr(RR/RMRNR.((Rt testReindex©s$ !  ! !c(Cstdƒ}x.tdƒD] }|i|t|dƒƒqWhdhdddg<dd<<}|i|ƒ}t |d ƒd2jpt |d ‚t |d i ƒƒ}d d d ddd d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.g(}||jp t |‚d/|dd0<|i|ƒ\}}t |i ƒƒ}||jpt ‚d1S(3sTest a range searchRidi RiÿÿÿiRsmin:maxiiii i i iiiiiii i!i(i)i*i+i2i3i4i5i<i=i>i?iFiGiHiIiPiQiRiSiZi[i\i]tandtoperatorN(sfoo(RtindexRtiR*RtrecordR,trttupleR1RKR texpecttr2tignore(RRUR[RVR\RWRXRZ((Rt testRangeÀs  '%~(RRt__doc__R(R)R+R5R<RDRGRHRIRRR](((RR (s  #       cCstititƒfƒS(N(tunittestt TestSuitet makeSuiteR (((Rt test_suiteâst__main__t defaultTestRb( R^R_tTestingtZope2tstartupt,Products.PluginIndexes.FieldIndex.FieldIndexRRtTestCaseR RbRtmain(R RRfR_ReRRb((Rt?s     º