Skip to content

Commit 09424a7

Browse files
committed
issue2551334 - get test suite running under windows
Make sure to close session and otk databases in tearDown so that test directory can be removed.
1 parent 8e3a506 commit 09424a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/db_test_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ def setupSchema(db, create, module):
160160
class MyTestCase(object):
161161
def tearDown(self):
162162
if hasattr(self, 'db'):
163-
self.db.close()
163+
if hasattr(self.db, 'session'):
164+
self.db.session.db.close()
165+
if hasattr(self.db, 'otk'):
166+
self.db.otk.db.close()
167+
self.db.close()
164168
if os.path.exists(config.DATABASE):
165169
shutil.rmtree(config.DATABASE)
166170

0 commit comments

Comments
 (0)