Commit dd5f1436 authored by Jeremy Hylton's avatar Jeremy Hylton

Add another init() method so cache tests can be run in a loop.

parent 70afaefa
......@@ -26,6 +26,11 @@ class RecalcitrantObject(Persistent):
def _p_deactivate(self):
self.__class__.deactivations += 1
def init(cls):
cls.deactivations = 0
init = classmethod(init)
class RegularObject(Persistent):
deactivations = 0
......@@ -120,6 +125,7 @@ class CacheTests:
also return when it's looked at each item, regardless of whether
it became a ghost.
>>> RecalcitrantObject.init()
>>> db = databaseFromString("<zodb>\n"
... "cache-size 4\n"
... "<mappingstorage/>\n"
......
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