--- a/server/test/unittest_extlite.py Fri Aug 14 18:34:42 2009 +0200
+++ b/server/test/unittest_extlite.py Fri Aug 14 18:54:35 2009 +0200
@@ -5,7 +5,15 @@
class SQLiteTC(TestCase):
sqlite_file = '_extlite_test.sqlite'
+
+ def _cleanup(self):
+ try:
+ os.remove(self.sqlite_file)
+ except:
+ pass
+
def setUp(self):
+ self._cleanup()
cnx1 = get_connection('sqlite', database=self.sqlite_file)
cu = cnx1.cursor()
cu.execute('CREATE TABLE toto(name integer);')
@@ -13,10 +21,7 @@
cnx1.close()
def tearDown(self):
- try:
- os.remove(self.sqlite_file)
- except:
- pass
+ self._cleanup()
def test(self):
lock = threading.Lock()