Mercurial > p > roundup > code
comparison test/db_test_base.py @ 3953:78dc9b275aeb
New tests for range searching by specifying just a month.
Currently some of them fail.
_add_granularity is broken - needs tests and complete fix.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 21 Dec 2007 11:21:09 +0000 |
| parents | c68581212cf7 |
| children | de6326aee6d0 |
comparison
equal
deleted
inserted
replaced
| 3952:c68581212cf7 | 3953:78dc9b275aeb |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: db_test_base.py,v 1.93 2007-12-20 01:01:49 richard Exp $ | 18 # $Id: db_test_base.py,v 1.94 2007-12-21 11:21:08 richard Exp $ |
| 19 | 19 |
| 20 import unittest, os, shutil, errno, imp, sys, time, pprint, sets, base64, os.path | 20 import unittest, os, shutil, errno, imp, sys, time, pprint, sets, base64, os.path |
| 21 | 21 |
| 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ | 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ |
| 23 Interval, DatabaseError, Boolean, Number, Node | 23 Interval, DatabaseError, Boolean, Number, Node |
| 1182 ae, filt = self.filteringSetup() | 1182 ae, filt = self.filteringSetup() |
| 1183 ae(filt(None, {'deadline': 'from 2003-02-16'}), ['1', '3', '4']) | 1183 ae(filt(None, {'deadline': 'from 2003-02-16'}), ['1', '3', '4']) |
| 1184 ae(filt(None, {'deadline': '2003-02-16;'}), ['1', '3', '4']) | 1184 ae(filt(None, {'deadline': '2003-02-16;'}), ['1', '3', '4']) |
| 1185 | 1185 |
| 1186 def testFilteringRangeYearMonthDay(self): | 1186 def testFilteringRangeYearMonthDay(self): |
| 1187 ae, filt = self.filteringSetup() | |
| 1187 ae(filt(None, {'deadline': '2002'}), []) | 1188 ae(filt(None, {'deadline': '2002'}), []) |
| 1188 ae(filt(None, {'deadline': '2003'}), ['1', '2', '3']) | 1189 ae(filt(None, {'deadline': '2003'}), ['1', '2', '3']) |
| 1189 ae(filt(None, {'deadline': '2004'}), ['4']) | 1190 ae(filt(None, {'deadline': '2004'}), ['4']) |
| 1190 ae(filt(None, {'deadline': '2003-02-16'}), ['1']) | 1191 ae(filt(None, {'deadline': '2003-02-16'}), ['1']) |
| 1191 ae(filt(None, {'deadline': '2003-02-17'}), []) | 1192 ae(filt(None, {'deadline': '2003-02-17'}), []) |
