comparison test/test_init.py @ 1165:14467c765167

sqlite backend!
author Richard Jones <richard@users.sourceforge.net>
date Wed, 18 Sep 2002 05:07:49 +0000
parents a7a1f6098263
children 1c5bc0e2ed7d
comparison
equal deleted inserted replaced
1164:e2b5f02cefe3 1165:14467c765167
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: test_init.py,v 1.18 2002-09-11 01:21:01 richard Exp $ 18 # $Id: test_init.py,v 1.19 2002-09-18 05:07:49 richard Exp $
19 19
20 import unittest, os, shutil, errno, imp, sys 20 import unittest, os, shutil, errno, imp, sys
21 21
22 from roundup import init 22 from roundup import init
23 23
78 backend = 'metakit' 78 backend = 'metakit'
79 79
80 class gadflyClassicTestCase(ClassicTestCase): 80 class gadflyClassicTestCase(ClassicTestCase):
81 backend = 'gadfly' 81 backend = 'gadfly'
82 82
83 class sqliteClassicTestCase(ClassicTestCase):
84 backend = 'sqlite'
85
83 def suite(): 86 def suite():
84 l = [ 87 l = [
85 unittest.makeSuite(ClassicTestCase, 'test'), 88 unittest.makeSuite(ClassicTestCase, 'test'),
86 ] 89 ]
87 90
88 try: 91 try:
89 import bsddb 92 import bsddb
90 l.append(unittest.makeSuite(bsddbClassicTestCase, 'test')) 93 l.append(unittest.makeSuite(bsddbClassicTestCase, 'test'))
91 except: 94 except:
92 print 'bsddb module not found, skipping bsddb DBTestCase' 95 print 'bsddb module not found, skipping bsddb init test'
93 96
94 try: 97 try:
95 import bsddb3 98 import bsddb3
96 l.append(unittest.makeSuite(bsddb3ClassicTestCase, 'test')) 99 l.append(unittest.makeSuite(bsddb3ClassicTestCase, 'test'))
97 except: 100 except:
98 print 'bsddb3 module not found, skipping bsddb3 DBTestCase' 101 print 'bsddb3 module not found, skipping bsddb3 init test'
99 102
100 try: 103 try:
101 import metakit 104 import metakit
102 l.append(unittest.makeSuite(metakitClassicTestCase, 'test')) 105 l.append(unittest.makeSuite(metakitClassicTestCase, 'test'))
103 except: 106 except:
104 print 'metakit module not found, skipping metakit DBTestCase' 107 print 'metakit module not found, skipping metakit init test'
105 108
106 try: 109 try:
107 import gadfly 110 import gadfly
108 l.append(unittest.makeSuite(gadflyClassicTestCase, 'test')) 111 l.append(unittest.makeSuite(gadflyClassicTestCase, 'test'))
109 except: 112 except:
110 print 'gadfly module not found, skipping gadfly DBTestCase' 113 print 'gadfly module not found, skipping gadfly init test'
114
115 try:
116 import sqlite
117 l.append(unittest.makeSuite(sqliteClassicTestCase, 'test'))
118 except:
119 print 'sqlite module not found, skipping sqlite init test'
111 120
112 return unittest.TestSuite(l) 121 return unittest.TestSuite(l)
113 122
114 # vim: set filetype=python ts=4 sw=4 et si 123 # vim: set filetype=python ts=4 sw=4 et si

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