mò )á¸Ec @s"dZdkZdkZdkZeiƒdkZdklZdfd„ƒYZedddƒedddƒedddƒed d dƒed dd ƒed ddƒedddƒedddƒgZ d„Z dei fd„ƒYZ d„ZedjoeiddƒndS(saDateRangeIndex unit tests. $Id: test_DateRangeIndex.py 40218 2005-11-18 14:39:19Z andreasjung $ N(sDateRangeIndextDummycBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCs||_||_||_dS(N(tnametselft_nametstartt_starttstopt_stop(RRRR((t^/data/zmath/zope/lib/python/Products/PluginIndexes/DateRangeIndex/tests/test_DateRangeIndex.pyt__init__s  cCs|iS(N(RR(R((RR$scCs|iS(N(RR(R((RR(scCs|iS(N(RR(R((RR,scCs|i|ifS(N(RRR(R((Rtdatum0s(t__name__t __module__R RRRR (((RRs     tatbtcitdi teitfi tgthii cCsxg}xktD]c}|iƒdjp|iƒ|jo7|iƒdjp|iƒ|jo|i|ƒq q W|S(N(tresulttdummiestdummyRtNonetvalueRtappend(RRR((RtmatchingDummies>s Lt DRI_TestscBsGtZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCsdS(N((R((RtsetUpMscCsdS(N((R((RttearDownPscCsydkl}dkl}dkl}dkl}dkl}||tƒ||tƒ||tƒ||tƒdS(N(sIDateRangeIndex(sIPluggableIndex(s ISortIndex(sIUniqueValueIndex(s verifyClass(t!Products.PluginIndexes.interfacestIDateRangeIndextIPluggableIndext ISortIndextIUniqueValueIndextzope.interface.verifyt verifyClasstDateRangeIndex(RR%R"R!R#R ((Rttest_z3interfacesSs        cCsÔtdƒ}|idƒdjpt‚|idƒ|idƒ pt‚|iddƒ pt‚|ihdd<ƒdjpt‚|ihdd<ƒ\}}| pt‚|djpt‚dS(NtemptyiÒtfooitzedi90(NN( R&R(tgetEntryForObjectRtAssertionErrortunindex_objectt uniqueValuest _apply_indexRtused(RR0RR(((Rt test_empty_s  &c Csutdddƒ}x.tttƒƒD]}|i|t|ƒq%WxAtttƒƒD]-}|i|ƒt|iƒjpt ‚qVWxçtddƒD]Ö}t |ƒ}|i hd|<ƒ\}}|d jpt ‚t|ƒt|ƒjp#t d|td„|ƒ|f‚|id„ƒxCtd||ƒD]/\}}|i|ƒ|iƒjpt ‚q:Wq—WdS( NtworkRRiÿÿÿÿis %s: %s == %scCs |iƒS(N(txR(R3((RtscCst|iƒ|iƒƒS(N(tcmpR3Rty(R3R6((RR4ƒs(sstartsstop(R&R2trangetlenRtit index_objectR+R R,RRtmatchesR/tresultsR0tmaptsortRRtmatch( RRR0R9R2R<R;RR?((Rttest_retrievalps"+ < cCs|it|iƒdS(N(Rt assertRaisest OverflowErrort_badlong(R((Rttest_longdatesˆscCsRtdddƒ}tdttiƒdttiƒdƒ}|id|ƒdS(NR2RRtbadii(R&R2RtlongtsystmaxintRER:(RR2RE((RRC‹s,( R R RRR'R1R@RDRC(((RRKs     cCs&tiƒ}|ititƒƒ|S(N(tunittestt TestSuitetsuitetaddTestt makeSuiteR(RK((Rt test_suite‘s t__main__t defaultTestRN(t__doc__RItTestingtZope2tstartupRGt4Products.PluginIndexes.DateRangeIndex.DateRangeIndexR&RRRRtTestCaseRRNR tmain( RRSRIRRRGRRNRR&R((Rt?s      ~ F