Mercurial > p > roundup > code
diff test/test_init.py @ 1094:854d45f8b745
fixes to tests and Interval unmarshalling
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 10 Sep 2002 01:27:13 +0000 |
| parents | 9b910e8d987d |
| children | a7a1f6098263 |
line wrap: on
line diff
--- a/test/test_init.py Tue Sep 10 01:11:30 2002 +0000 +++ b/test/test_init.py Tue Sep 10 01:27:13 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_init.py,v 1.16 2002-09-10 00:19:54 richard Exp $ +# $Id: test_init.py,v 1.17 2002-09-10 01:27:13 richard Exp $ import unittest, os, shutil, errno, imp, sys @@ -68,86 +68,35 @@ l = db.issue.list() ae(l, []) -class ExtendedTestCase(MyTestCase): - backend = 'anydbm' - def testCreation(self): - ae = self.assertEqual - - # create the instance - init.install(self.dirname, 'extended', self.backend) - init.initialise(self.dirname, 'sekrit') - - # check we can load the package - instance = imp.load_package(self.dirname, self.dirname) - - # and open the database - db = instance.open() - - # check the basics of the schema and initial data set - l = db.priority.list() - ae(l, ['1', '2', '3', '4']) - l = db.status.list() - ae(l, ['1', '2', '3', '4', '5', '6', '7', '8']) - l = db.keyword.list() - ae(l, []) - l = db.user.list() - ae(l, ['1', '2']) - l = db.msg.list() - ae(l, []) - l = db.file.list() - ae(l, []) - l = db.issue.list() - ae(l, []) - l = db.support.list() - ae(l, []) - l = db.rate.list() - ae(l, ['1', '2', '3']) - l = db.source.list() - ae(l, ['1', '2', '3', '4']) - l = db.platform.list() - ae(l, ['1', '2', '3']) - l = db.timelog.list() - ae(l, []) - class bsddbClassicTestCase(ClassicTestCase): backend = 'bsddb' -class bsddbExtendedTestCase(ExtendedTestCase): - backend = 'bsddb' class bsddb3ClassicTestCase(ClassicTestCase): backend = 'bsddb3' -class bsddb3ExtendedTestCase(ExtendedTestCase): - backend = 'bsddb3' class metakitClassicTestCase(ClassicTestCase): backend = 'metakit' -class metakitExtendedTestCase(ExtendedTestCase): - backend = 'metakit' def suite(): l = [ unittest.makeSuite(ClassicTestCase, 'test'), - unittest.makeSuite(ExtendedTestCase, 'test') ] try: import bsddb l.append(unittest.makeSuite(bsddbClassicTestCase, 'test')) - l.append(unittest.makeSuite(bsddbExtendedTestCase, 'test')) except: print 'bsddb module not found, skipping bsddb DBTestCase' try: import bsddb3 l.append(unittest.makeSuite(bsddb3ClassicTestCase, 'test')) - l.append(unittest.makeSuite(bsddb3ExtendedTestCase, 'test')) except: print 'bsddb3 module not found, skipping bsddb3 DBTestCase' try: import metakit l.append(unittest.makeSuite(metakitClassicTestCase, 'test')) - l.append(unittest.makeSuite(metakitExtendedTestCase, 'test')) except: print 'metakit module not found, skipping metakit DBTestCase'
