Commit 1d63f327 authored by Jim Fulton's avatar Jim Fulton

Added test to make sure we can't close a connection with an active

savepoint.
parent aa982b20
......@@ -70,6 +70,23 @@ savepoints.)
>>> transaction.commit()
"""
def testCantCloseConnectionWithActiveSavepoint():
"""
>>> import ZODB.tests.util
>>> db = ZODB.tests.util.DB()
>>> connection = db.open()
>>> root = connection.root()
>>> root['a'] = 1
>>> sp = transaction.savepoint()
>>> connection.close()
Traceback (most recent call last):
...
ConnectionStateError: Cannot close a connection joined to a transaction
>>> db.close()
"""
def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite('testConnectionSavepoint.txt'),
......
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