Commit c5bf9abd authored by Jeremy Hylton's avatar Jeremy Hylton

doc strings

parent e485bfad
# Run the history() related tests for a storage. Any storage that supports
# the history() method should be able to pass all these tests.
"""Run the history() related tests for a storage.
Any storage that supports the history() method should be able to pass
all these tests.
"""
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle
......
# Run tests against the iterator() interface for storages. Any storage that
# supports the iterator() method should be able to pass all these tests.
"""Run tests against the iterator() interface for storages.
Any storage that supports the iterator() method should be able to pass
all these tests.
"""
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle
......
# Run some tests relevant for storages that support pack()
"""Run some tests relevant for storages that support pack()."""
try:
import cPickle
......@@ -18,7 +18,6 @@ from ZODB.referencesf import referencesf
ZERO = '\0'*8
# This class is for the root object. It must not contain a getoid() method
# (really, attribute). The persistent pickling machinery -- in the dumps()
......
# This class must be one of the mixin base class for your storage test. It
# provides basic setUp() and tearDown() semantics (which you can override),
# and it also provides a helper method _dostore() which performs a complete
# store transaction for a single object revision.
"""Provide a mixin base class for storage tests.
The StorageTestBase class provides basic setUp() and tearDown()
semantics (which you can override), and it also provides a helper
method _dostore() which performs a complete store transaction for a
single object revision.
"""
import pickle
import string
......@@ -18,6 +21,7 @@ from ZODB.tests.MinPO import MinPO
ZERO = '\0'*8
def zodb_pickle(obj):
"""Create a pickle in the format expected by ZODB."""
f = StringIO()
p = Pickler(f, 1)
klass = obj.__class__
......@@ -35,6 +39,7 @@ def zodb_pickle(obj):
return f.getvalue(1)
def zodb_unpickle(data):
"""Unpickle an object stored using the format expected by ZODB."""
f = StringIO(data)
u = Unpickler(f)
klass_info = u.load()
......
# Check transactionalUndo(). Any storage that supports transactionalUndo()
# must pass these tests.
"""Check transactionalUndo().
Any storage that supports transactionalUndo() must pass these tests.
"""
import types
from ZODB import POSException
......
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