comparison test/test_postgresql.py @ 2254:1995c97912c2

fix to postgresql test harness
author Richard Jones <richard@users.sourceforge.net>
date Wed, 05 May 2004 11:22:01 +0000
parents f5755353e972
children 351304739aae
comparison
equal deleted inserted replaced
2253:91118ac2fa7f 2254:1995c97912c2
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_postgresql.py,v 1.8 2004-03-25 02:16:08 richard Exp $ 18 # $Id: test_postgresql.py,v 1.9 2004-05-05 11:22:01 richard Exp $
19 19
20 import unittest 20 import unittest
21 21
22 from roundup.hyperdb import DatabaseError 22 from roundup.hyperdb import DatabaseError
23 23
107 if not hasattr(backends, 'postgresql'): 107 if not hasattr(backends, 'postgresql'):
108 print "Skipping postgresql tests" 108 print "Skipping postgresql tests"
109 return suite 109 return suite
110 110
111 # make sure we start with a clean slate 111 # make sure we start with a clean slate
112 from roundup.backends.back_postgresql import db_nuke 112 from roundup.backends.back_postgresql import db_nuke, db_exists
113 db_nuke(config, 1) 113 if db_exists(config):
114 db_nuke(config, 1)
114 115
115 # TODO: Check if we can run postgresql tests 116 # TODO: Check if we can run postgresql tests
116 print 'Including postgresql tests' 117 print 'Including postgresql tests'
117 suite.addTest(unittest.makeSuite(postgresqlDBTest)) 118 suite.addTest(unittest.makeSuite(postgresqlDBTest))
118 suite.addTest(unittest.makeSuite(postgresqlROTest)) 119 suite.addTest(unittest.makeSuite(postgresqlROTest))

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