Commit 35f5aa4b authored by Marius Gedminas's avatar Marius Gedminas

Made ZODB test_cache doctests clean up the transaction.

parent b396707a
...@@ -56,6 +56,10 @@ class CacheTests: ...@@ -56,6 +56,10 @@ class CacheTests:
def test_cache(self): def test_cache(self):
r"""Test basic cache methods. r"""Test basic cache methods.
Let's start with a clean transaction
>>> transaction.abort()
>>> RegularObject.init() >>> RegularObject.init()
>>> db = databaseFromString("<zodb>\n" >>> db = databaseFromString("<zodb>\n"
... "cache-size 4\n" ... "cache-size 4\n"
...@@ -114,6 +118,10 @@ class CacheTests: ...@@ -114,6 +118,10 @@ class CacheTests:
>>> RegularObject.deactivations >>> RegularObject.deactivations
10 10
Clean up
>>> transaction.abort()
""" """
def test_cache_gc_recalcitrant(self): def test_cache_gc_recalcitrant(self):
......
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