Commit 48d96cc9 authored by Jim Fulton's avatar Jim Fulton

Close test connection

For safety, closing the database aborts transaction managers
associated with open connections.  In explicit mode, this can lead to
NoTransaction errors.

It's likely a bug for DB objects to abort transactons on
close.  This needs more thought.
parent 24c61eae
......@@ -1341,6 +1341,7 @@ class TestConnection(unittest.TestCase):
self.assertEqual(len(syncs), 2)
conn.transaction_manager.abort()
self.assertEqual(len(syncs), 2)
conn.close()
db.close()
# For reference, in non-explicit mode:
......@@ -1351,6 +1352,8 @@ class TestConnection(unittest.TestCase):
self.assertEqual(len(syncs), 3)
conn.transaction_manager.abort()
self.assertEqual(len(syncs), 4)
conn.close()
db.close()
class StubDatabase:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment