Skip to content

Commit 85db65d

Browse files
author
Richard Jones
committed
*** empty log message ***
1 parent a05e797 commit 85db65d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

test/db_test_base.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: db_test_base.py,v 1.79 2006-11-09 03:08:22 richard Exp $
18+
# $Id: db_test_base.py,v 1.80 2006-11-09 05:44:51 richard Exp $
1919

2020
import unittest, os, shutil, errno, imp, sys, time, pprint, sets
2121

@@ -1045,32 +1045,36 @@ def testFilteringMany(self):
10451045
ae(filt(None, {'nosy': '2', 'status': '1'}, ('+','id'), (None,None)),
10461046
['3'])
10471047

1048-
def testFilteringRange(self):
1048+
def testFilteringRangeBasic(self):
10491049
ae, filt = self.filteringSetup()
1050-
# Date ranges
10511050
ae(filt(None, {'deadline': 'from 2003-02-10 to 2003-02-23'}), ['1','3'])
10521051
ae(filt(None, {'deadline': '2003-02-10; 2003-02-23'}), ['1','3'])
10531052
ae(filt(None, {'deadline': '; 2003-02-16'}), ['2'])
1054-
# Lets assume people won't invent a time machine, otherwise this test
1055-
# may fail :)
1053+
1054+
def testFilteringRangeTwoSyntaxes(self):
1055+
ae, filt = self.filteringSetup()
10561056
ae(filt(None, {'deadline': 'from 2003-02-16'}), ['1', '3', '4'])
10571057
ae(filt(None, {'deadline': '2003-02-16;'}), ['1', '3', '4'])
1058-
ae(filt(None, {'deadline': '2003-02-16;'}), ['1', '3', '4'])
1059-
# year and month granularity
1058+
1059+
def testFilteringRangeYearMonthDay(self):
1060+
ae, filt = self.filteringSetup()
10601061
ae(filt(None, {'deadline': '2002'}), [])
10611062
ae(filt(None, {'deadline': '2003'}), ['1', '2', '3'])
10621063
ae(filt(None, {'deadline': '2004'}), ['4'])
10631064
ae(filt(None, {'deadline': '2003-02'}), ['1', '3'])
10641065
ae(filt(None, {'deadline': '2003-03'}), [])
10651066
ae(filt(None, {'deadline': '2003-02-16'}), ['1'])
10661067
ae(filt(None, {'deadline': '2003-02-17'}), [])
1067-
# Interval ranges
1068+
1069+
def testFilteringRangeInterval(self):
1070+
ae, filt = self.filteringSetup()
10681071
ae(filt(None, {'foo': 'from 0:50 to 2:00'}), ['1'])
10691072
ae(filt(None, {'foo': 'from 0:50 to 1d 2:00'}), ['1', '2'])
10701073
ae(filt(None, {'foo': 'from 5:50'}), ['2'])
10711074
ae(filt(None, {'foo': 'to 0:05'}), [])
10721075

1073-
# further
1076+
def testFilteringRangeGeekInterval(self):
1077+
ae, filt = self.filteringSetup()
10741078
for issue in (
10751079
{ 'deadline': date.Date('. -2d')},
10761080
{ 'deadline': date.Date('. -1d')},

0 commit comments

Comments
 (0)