Commit 6cb2c2de authored by Jim Fulton's avatar Jim Fulton

Added an abort on tearDown to avoid leaking storages between tests.

parent 1aa7de9b
...@@ -17,7 +17,8 @@ $Id$ ...@@ -17,7 +17,8 @@ $Id$
""" """
import unittest import unittest
from zope.testing import doctest from zope.testing import doctest
import persistent.dict, transaction import persistent.dict
import transaction
def testAddingThenModifyThenAbort(): def testAddingThenModifyThenAbort():
"""\ """\
...@@ -153,10 +154,13 @@ We simply rely on the underlying storage method. ...@@ -153,10 +154,13 @@ We simply rely on the underlying storage method.
False False
""" """
def tearDown(test):
transaction.abort()
def test_suite(): def test_suite():
return unittest.TestSuite(( return unittest.TestSuite((
doctest.DocFileSuite('testConnectionSavepoint.txt'), doctest.DocFileSuite('testConnectionSavepoint.txt', tearDown=tearDown),
doctest.DocTestSuite(), doctest.DocTestSuite(tearDown=tearDown),
)) ))
if __name__ == '__main__': if __name__ == '__main__':
......
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