comparison tests/test_db.py @ 90:76803679598f

oops - wasn't deleting the test dir after the read-only tests
author Richard Jones <richard@users.sourceforge.net>
date Fri, 27 Jul 2001 06:26:43 +0000
parents 168def1ce74d
children
comparison
equal deleted inserted replaced
89:b6b30ba53986 90:76803679598f
1 # $Id: test_db.py,v 1.6 2001-07-27 06:23:59 richard Exp $ 1 # $Id: test_db.py,v 1.7 2001-07-27 06:26:43 richard Exp $
2 2
3 import unittest, os, shutil 3 import unittest, os, shutil
4 4
5 from roundup.backends import anydbm 5 from roundup.backends import anydbm
6 from roundup.hyperdb import String, Link, Multilink, Date, Interval, Class, \ 6 from roundup.hyperdb import String, Link, Multilink, Date, Interval, Class, \
133 setupSchema(db, 1) 133 setupSchema(db, 1)
134 db.close() 134 db.close()
135 self.db = Database('_test_dir') 135 self.db = Database('_test_dir')
136 setupSchema(self.db, 0) 136 setupSchema(self.db, 0)
137 137
138 def tearDown(self):
139 self.db.close()
140 shutil.rmtree('_test_dir')
141
138 def testExceptions(self): 142 def testExceptions(self):
139 # this tests the exceptions that should be raised 143 # this tests the exceptions that should be raised
140 ar = self.assertRaises 144 ar = self.assertRaises
141 145
142 # this tests the exceptions that should be raised 146 # this tests the exceptions that should be raised
151 return unittest.TestSuite((db, readonlydb)) 155 return unittest.TestSuite((db, readonlydb))
152 156
153 157
154 # 158 #
155 # $Log: not supported by cvs2svn $ 159 # $Log: not supported by cvs2svn $
160 # Revision 1.6 2001/07/27 06:23:59 richard
161 # consistency
162 #
156 # Revision 1.5 2001/07/27 06:23:09 richard 163 # Revision 1.5 2001/07/27 06:23:09 richard
157 # Added some new hyperdb tests to make sure we raise the right exceptions. 164 # Added some new hyperdb tests to make sure we raise the right exceptions.
158 # 165 #
159 # Revision 1.4 2001/07/25 04:34:31 richard 166 # Revision 1.4 2001/07/25 04:34:31 richard
160 # Added id and log to tests files... 167 # Added id and log to tests files...

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