X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=test%2Ftest_init.py;h=b58d0cefa04a993467f1eb5881ff7e57faf48a68;hb=3cd572b9843d1cc2a9b3baf865a72e21cb76a598;hp=eab0160b9df89e1ada65f04652314ecf853c84f3;hpb=f09b3fe695d3d03379c61d10af81fd62e5fcd76e;p=roundup.git diff --git a/test/test_init.py b/test/test_init.py index eab0160..b58d0ce 100644 --- a/test/test_init.py +++ b/test/test_init.py @@ -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.17 2002-09-10 01:27:13 richard Exp $ +# $Id: test_init.py,v 1.22 2003-03-18 00:50:24 richard Exp $ import unittest, os, shutil, errno, imp, sys @@ -43,7 +43,8 @@ class ClassicTestCase(MyTestCase): ae = self.assertEqual # create the instance - init.install(self.dirname, 'classic', self.backend) + init.install(self.dirname, 'classic') + init.write_select_db(self.dirname, self.backend) init.initialise(self.dirname, 'sekrit') # check we can load the package @@ -77,28 +78,28 @@ class bsddb3ClassicTestCase(ClassicTestCase): class metakitClassicTestCase(ClassicTestCase): backend = 'metakit' +class mysqlClassicTestCase(ClassicTestCase): + backend = 'mysql' + +class sqliteClassicTestCase(ClassicTestCase): + backend = 'sqlite' + def suite(): l = [ unittest.makeSuite(ClassicTestCase, 'test'), ] - try: - import bsddb + from roundup import backends + if hasattr(backends, 'bsddb'): l.append(unittest.makeSuite(bsddbClassicTestCase, 'test')) - except: - print 'bsddb module not found, skipping bsddb DBTestCase' - - try: - import bsddb3 + if hasattr(backends, 'bsddb3'): l.append(unittest.makeSuite(bsddb3ClassicTestCase, 'test')) - except: - print 'bsddb3 module not found, skipping bsddb3 DBTestCase' - - try: - import metakit + if hasattr(backends, 'metakit'): l.append(unittest.makeSuite(metakitClassicTestCase, 'test')) - except: - print 'metakit module not found, skipping metakit DBTestCase' + if hasattr(backends, 'mysql'): + l.append(unittest.makeSuite(mysqlClassicTestCase, 'test')) + if hasattr(backends, 'sqlite'): + l.append(unittest.makeSuite(sqliteClassicTestCase, 'test')) return unittest.TestSuite(l)