Skip to content

Commit af876b4

Browse files
author
Richard Jones
committed
Final fix for date range searching stuff: fix the test :)
1 parent 399e785 commit af876b4

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

CHANGES.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ Feature:
66
- New config option in mail section: ignore_alternatives allows to
77
ignore alternatives besides the text/plain part used for the content
88
of a message in multipart/alternative attachments.
9-
- Handle no time.tzset under Windows (sf #1825643)
109
- Admin copy of error email from mailgw includes traceback (thanks Ulrik
1110
Mikaelsson)
1211

12+
Fixed:
13+
- Searching date range by supplying just a date as the filter spec
14+
- Handle no time.tzset under Windows (sf #1825643)
15+
1316

1417
2007-11-09 1.4.1
1518
Fixed:

roundup/__init__.py

Lines changed: 2 additions & 2 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: __init__.py,v 1.48 2007-11-07 21:24:24 richard Exp $
18+
# $Id: __init__.py,v 1.49 2007-12-23 01:52:07 richard Exp $
1919

2020
'''Roundup - issue tracking for knowledge workers.
2121
@@ -68,6 +68,6 @@
6868
'''
6969
__docformat__ = 'restructuredtext'
7070

71-
__version__ = '1.4.1'
71+
__version__ = '1.4.2'
7272

7373
# vim: set filetype=python ts=4 sw=4 et si

roundup/backends/back_anydbm.py

Lines changed: 2 additions & 2 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: back_anydbm.py,v 1.208 2007-09-27 06:18:53 jpend Exp $
18+
#$Id: back_anydbm.py,v 1.209 2007-12-23 01:52:07 richard Exp $
1919
'''This module defines a backend that saves the hyperdatabase in a
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -1644,7 +1644,7 @@ def _filter(self, search_matches, filterspec, proptree,
16441644
l.append((OTHER, k, [float(val) for val in v]))
16451645

16461646
filterspec = l
1647-
1647+
16481648
# now, find all the nodes that are active and pass filtering
16491649
matches = []
16501650
cldb = self.db.getclassdb(cn)

test/db_test_base.py

Lines changed: 4 additions & 6 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.94 2007-12-21 11:21:08 richard Exp $
18+
# $Id: db_test_base.py,v 1.95 2007-12-23 01:52:07 richard Exp $
1919

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

@@ -1193,16 +1193,14 @@ def testFilteringRangeYearMonthDay(self):
11931193

11941194
def testFilteringRangeMonths(self):
11951195
ae, filt = self.filteringSetup()
1196-
for month in range(1, 5): #13):
1197-
print 'MONTH', month
1196+
for month in range(1, 13):
11981197
for n in range(1, month+1):
11991198
i = self.db.issue.create(title='%d.%d'%(month, n),
1200-
deadline=date.Date('2004-%02d-%02d.00:00'%(month, n)))
1201-
print 'CREATE', i, self.db.issue.get(i, 'deadline')
1199+
deadline=date.Date('2001-%02d-%02d.00:00'%(month, n)))
12021200
self.db.commit()
12031201

12041202
for month in range(1, 13):
1205-
r = filt(None, dict(deadline='2004-%02d'%month))
1203+
r = filt(None, dict(deadline='2001-%02d'%month))
12061204
assert len(r) == month, 'month %d != length %d'%(month, len(r))
12071205

12081206
def testFilteringRangeInterval(self):

0 commit comments

Comments
 (0)