comparison test/db_test_base.py @ 2602:a32349bfcde4

fix unit test
author Richard Jones <richard@users.sourceforge.net>
date Tue, 20 Jul 2004 22:59:53 +0000
parents 113548baeed2
children 5ccd99777869
comparison
equal deleted inserted replaced
2601:113548baeed2 2602:a32349bfcde4
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.40 2004-07-20 22:56:18 richard Exp $ 18 # $Id: db_test_base.py,v 1.41 2004-07-20 22:59:53 richard Exp $
19 19
20 import unittest, os, shutil, errno, imp, sys, time, pprint 20 import unittest, os, shutil, errno, imp, sys, time, pprint
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
963 # '3': '2003-02-18' 2 => 3 963 # '3': '2003-02-18' 2 => 3
964 # '4': '2004-03-08' 1 => 2 964 # '4': '2004-03-08' 1 => 2
965 ae, filt = self.filteringSetup() 965 ae, filt = self.filteringSetup()
966 # ascending 966 # ascending
967 ae(filt(None, {}, ('+','deadline'), ('+','priority')), 967 ae(filt(None, {}, ('+','deadline'), ('+','priority')),
968 ['1', '2', '3', '4'])
969 ae(filt(None, {}, ('-','deadline'), ('+','priority')),
968 ['2', '1', '4', '3']) 970 ['2', '1', '4', '3'])
969 ae(filt(None, {}, ('-','deadline'), ('+','priority')),
970 ['2', '4', '1', '3'])
971 # descending 971 # descending
972 ae(filt(None, {}, ('+','deadline'), ('-','priority')), 972 ae(filt(None, {}, ('+','deadline'), ('-','priority')),
973 ['3', '1', '4', '2']) 973 ['3', '4', '1', '2'])
974 ae(filt(None, {}, ('-','deadline'), ('-','priority')), 974 ae(filt(None, {}, ('-','deadline'), ('-','priority')),
975 ['3', '4', '1', '2']) 975 ['4', '3', '2', '1'])
976 976
977 # XXX add sorting tests for other types 977 # XXX add sorting tests for other types
978 # XXX test auditors and reactors 978 # XXX test auditors and reactors
979 979
980 def testImportExport(self): 980 def testImportExport(self):

Roundup Issue Tracker: http://roundup-tracker.org/